SSRS 2012中的自定义表单身份验证

时间:2014-02-26 17:22:33

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

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

我一直遵循Microsoft's security extension sample靠近牙齿的指示。我所做的唯一修改是实际的UILogin.aspx和Login.aspx以及UserAccounts数据库,并且使用了wmi namespace v11。项目在调试模式下编译( GetUserInfo 修改为不包括Assert和null引用异常)

我已成功添加自定义登录,并在< Security>< Extension><>< < < < < <   < 配置元素。此用户可以同时连接到报告管理器( https://< domain> / Reports )和报告服务器视图( https://< domain> / ReportServer )[已配置为使用https,似乎工作。使用自定义表单身份验证的想法是,我们可以远程访问报告]

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

报告管理器错误:

  

用户''没有所需的权限。验证是否足够   权限已被授予和Windows用户帐户控制(UAC)   限制已得到解决

报告服务器视图错误(用户名掩码):

  

授予用户'<用户名>'的权限不够   用于执行此操作。 (rsAccessDenied)

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

如果我然后修改上面提到的< Security>< Extension>< Configuration>< AdminConfiguration>< UserName> 配置元素以使用新用户登录,那么它可以正常工作。

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


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

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)

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

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.;

1 个答案:

答案 0 :(得分:4)

找到了解决方案。

还必须将新用户设置为通过报告管理器对报告主文件夹进行角色访问。

我使用了一个我可以登录到报告管理器的用户,并通过主页 - &gt;文件夹设置 - >安全 - >新角色分配,并添加了具有相应角色的新用户