【发布时间】:2008-12-03 00:10:58
【问题描述】:
您可以从 Microsoft SQL Reporting Services 中的 Forms Authentication 中从哪个变量中获取用户名? User!UserId 值作为运行报告服务的 Windows 帐户返回。
【问题讨论】:
标签: reporting-services forms-authentication
您可以从 Microsoft SQL Reporting Services 中的 Forms Authentication 中从哪个变量中获取用户名? User!UserId 值作为运行报告服务的 Windows 帐户返回。
【问题讨论】:
标签: reporting-services forms-authentication
我不能 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);
如果这些信息还不够,我可以帮助你澄清你的问题。
【讨论】: