您可以从 Microsoft SQL Reporting Services 中的 Forms Authentication 中获取用户名的变量是什么?User!UserId 值作为运行报告服务的 Windows 帐户返回。
Bruno Tyndall
问问题
2163 次
1 回答
2
我不能 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);
如果这不是足够的信息,如果您澄清您的问题,我可以帮助您。
于 2008-12-06T23:25:03.147 回答