c# - SSRS 2012 中的自定义表单例份验证

标签 c# asp.net authentication ssrs-2012 reporting-services-2012

我是 SSRS 新手,被要求添加自定义身份验证以访问 SQL Server 2012 上的报表服务器和报表管理器

我一直按照Microsoft's security extension sample的指示进行操作靠近 dentry 。我所做的唯一修改是对实际的 UILogin.aspx 和 Login.aspx 以及 UserAccounts 数据库以及使用的 wmi 命名空间 v11。该项目在 Debug模式下编译(GetUserInfo修改为不包含断言和空引用异常)

我成功添加自定义登录名并将其分配为/ReportServer/rsreportserver.config 中 配置下的管理员元素。该用户能够连接到报表管理器 (https:///Reports) 和报表服务器 View (https:///ReportServer) [已配置为使用 https 并且似乎可以工作。使用自定义表单例份验证的想法是我们可以远程访问报告]

然后,我在 UserAccounts 数据库中注册一个新用户,并希望该用户也有权访问报表管理器。使用第一个设置用户登录报告管理器,然后转到站点设置->安全->新角色分配,然后使用“系统管理”和“系统用户”添加新用户(不是域用户)角色。我希望这应该让用户能够访问两种登录类型。但尝试使用新用户登录会出现错误:

报告管理器错误:

User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed

报告服务器 View 错误(用户名被屏蔽):

The permissions granted to user '<user name>' are insufficient for performing this operation. (rsAccessDenied)

我已将项目调试到附加进程,自定义登录验证码按预期成功。

如果我随后修改上面提到的 配置元素以使用新用户登录,那么它就可以工作。

这似乎不正确,我们只能设置一个用户进行自定义身份验证。有人能够对多个自定义用户登录执行此操作吗?

<小时/>

报表服务器日志转储(报表管理器登录):

library!ReportServer_0-26!1524!02/26/2014-11:04:24:: i INFO: Call to GetItemTypeAction(/).
library!ReportServer_0-26!1524!02/26/2014-11:04:24:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'enp' are insufficient for performing this operation.;
library!ReportServer_0-26!17bc!02/26/2014-11:07:28:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: , Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null.;
library!ReportServer_0-26!d14!02/26/2014-11:07:58:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: , Microsoft.ReportingServices.Diagnostics.Utilities.AuthenticationExtensionException: The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null.;
library!ReportServer_0-26!1518!02/26/2014-11:08:44:: i INFO: Call to GetPermissionsAction(/).
ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.
   at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.OnInit(EventArgs e)
   at System.Web.UI.Page.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
library!ReportServer_0-26!6c0!02/26/2014-11:08:44:: i INFO: Call to GetSystemPermissionsAction().
ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: HTTP status code --> 500
-------Details--------
Microsoft.ReportingServices.UI.FolderPage+InsufficientPermissionsToRoot: User '' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed.

   at Microsoft.ReportingServices.UI.FolderPage.Page_Init(Object sender, EventArgs e)

   at System.EventHandler.Invoke(Object sender, EventArgs e)

   at System.Web.UI.Control.OnInit(EventArgs e)

   at System.Web.UI.Page.OnInit(EventArgs e)

   at System.Web.UI.Control.InitRecursive(Control namingContainer)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
library!ReportServer_0-26!6e0!02/26/2014-11:08:44:: i INFO: Call to GetSystemPropertiesAction().
ui!ReportManager_0-25!1524!02/26/2014-11:08:44:: e ERROR: System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Thread.AbortInternal()
   at System.Threading.Thread.Abort(Object stateInfo)
   at System.Web.HttpResponse.End()
   at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)

报表服务器日志转储(报 TableView 登录 - 用户名屏蔽):

library!ReportServer_0-26!117c!02/26/2014-10:56:08:: i INFO: Call to GetItemTypeAction(/).
library!ReportServer_0-26!117c!02/26/2014-10:56:08:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: , Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user '<user name>' are insufficient for performing this operation.;

最佳答案

找到解决方案。

还必须将新用户设置为通过报表管理器对报表主文件夹具有角色访问权限。

我使用了一个可以登录报表管理器的用户,然后通过主页->文件夹设置->安全->新角色分配并添加了具有适当角色的新用户。

关于c# - SSRS 2012 中的自定义表单例份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22048669/

相关文章:

c# - 在 CMake 中使用多个代码生成器

c# - Asp.net MVC4 强制路由参数

javascript - 来自其他站点的链接应打开该站点的第一个链接

azure - Microsoft Graph - 使用应用程序 token 获取 MemberOf 错误

django - 如何使用curl登录Graphene Django应用程序?

c# - 从输入数据流中查找重复计数...

c# - 使用 CLR 在 C# 中执行 SQl 查询

javascript - 如何将 Bootstrap 工具提示应用于动态生成的表

c# - 无法从 ASP.NET 网页发送邮件

PHP 登录框架,包括 google/facebook/openid 等