【问题标题】:Forms Authentication / Reporting Services - Getting the Username表单身份验证/报告服务 - 获取用户名
【发布时间】:2008-12-03 00:10:58
【问题描述】:

您可以从 Microsoft SQL Reporting Services 中的 Forms Authentication 中从哪个变量中获取用户名? User!UserId 值作为运行报告服务的 Windows 帐户返回。

【问题讨论】:

    标签: reporting-services forms-authentication


    【解决方案1】:

    我不能 100% 确定你在哪里感到困惑,所以如果这不是你要找的,请告诉我。几个月前,我在使用报告服务时自己解决了这个问题。

    我在我的 login.aspx.cs 中发现了这段代码,在我验证给定的用户名/密码经过身份验证/授权后立即调用它。

    
    // Setup a remote session with the current userID as the AuthCookie username.
    // This userID is subsequently passed to reporting services as the UserID running the report
    authCookie = FormsAuthentication.GetAuthCookie("the username here", false);
    

    如果这些信息还不够,我可以帮助你澄清你的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 2020-12-13
      • 1970-01-01
      • 1970-01-01
      • 2019-09-08
      • 1970-01-01
      相关资源
      最近更新 更多