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

发布于 2024-07-09 13:13:00 字数 103 浏览 6 评论 0原文

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

From what variable can you pick up the username from Forms Authentication in Microsoft SQL Reporting Services? The User!UserId value comes back as the Windows Account that reporting services is running under.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自控 2024-07-16 13:13:00

我不能 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);

如果这还不够,如果您澄清您的问题,我可以帮助您。

I'm not 100% sure where you are confused here so please let me know if this isn't what you're looking for. I solved this issue myself a couple months ago when working with reporting services.

I found this chunk of code in my login.aspx.cs which is being called right after I've verified that a given username/password is authenticated/authorized.


// 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);

If this isn't enough information I can help you if you clarify your question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文