Reporting services 表单身份验证/报告服务-获取用户名

Reporting services 表单身份验证/报告服务-获取用户名,reporting-services,forms-authentication,Reporting Services,Forms Authentication,在Microsoft SQL Reporting Services中,您可以从哪个变量从表单身份验证中获取用户名?用户!UserId值作为运行reporting services的Windows帐户返回。我不能100%确定您在这里哪里感到困惑,因此如果这不是您想要的,请告诉我。几个月前,在与reporting services合作时,我自己解决了这个问题 我在login.aspx.cs中找到了这段代码,在我验证给定用户名/密码是否经过身份验证/授权后,将立即调用这段代码 // Setup a

在Microsoft SQL Reporting Services中,您可以从哪个变量从表单身份验证中获取用户名?用户!UserId值作为运行reporting services的Windows帐户返回。

我不能100%确定您在这里哪里感到困惑,因此如果这不是您想要的,请告诉我。几个月前,在与reporting services合作时,我自己解决了这个问题

我在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);
如果这还不够,我可以帮你澄清你的问题