访问报表服务器的AppPool权限问题

时间:2012-06-11 19:36:43

标签: asp.net iis reporting-services reporting

我有一台运行在Windows 7计算机上的SQL Server 2008 R2报表服务器以及一个ASP.NET应用程序。 ASP.NET应用程序向报表服务器发出请求以显示报表列表,呈现报表等。我的ASP.NET应用程序成功获取报表列表但是当它尝试呈现报表时,我收到以下错误:

The permissions granted to user 'IIS APPPOOL\DefaultAppPool' are insufficient for performing this operation. (rsAccessDenied)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Microsoft.Reporting.WebForms.ReportServerException: The permissions granted to user 'IIS APPPOOL\DefaultAppPool' are insufficient for performing this operation. (rsAccessDenied)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ReportServerException: The permissions granted to user 'IIS APPPOOL\DefaultAppPool' are insufficient for performing this operation. (rsAccessDenied)]
Microsoft.Reporting.WebForms.ServerReportSoapProxy.OnSoapException(SoapException e) +89
Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.ProxyMethodInvocation.Execute(RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod) +404
Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID) +180
Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() +79
Microsoft.Reporting.WebForms.ServerReport.GetParameters() +54

注意:这个相同的代码库在运行Windows 7和Windows Server 2008的多台计算机上运行良好。我一直在尝试基于Web搜索的许多不同的东西,但还没有找到解决方案。任何有关这方面的见解将不胜感激。

6 个答案:

答案 0 :(得分:26)

最后弄明白了。我的Reporting Services配置为本地帐户,而我的IIS应用程序池配置为ApplicationPoolIdentity。我将我的应用程序池更改为LocalSystem并修复了它。希望这些信息对其他人有用,因为我浪费了几个小时来搞清楚这一点。

答案 1 :(得分:17)

mreyeros在评论中提出的另一个解决方案是向浏览器管理器中的IIS APPPOOL \ DefaultAppPool用户授予浏览器权限。

为此,您应该在主文件夹中打开报表管理器网站(http:/// Reports),单击文件夹设置 - >单击安全性,单击新建角色分配并输入IIS APPPOOL \ DefaultAppPool作为名称,从列表中选择权限。

答案 2 :(得分:4)

除了在Windows Server 2008 R2上运行的IIS和报表服务器之外,其他情况几乎相同。我曾经让asp.net应用程序运行它自己的应用程序池,一切正常。当我将应用程序更改为DefaultAppPool时(由于不同的问题),我收到了权限问题。我将DefaultAppPool的标识从ApplicationPoolIdentity更改为LocalSystem(在IIS中,高级设置),然后再次运行。

答案 3 :(得分:4)

正如Michal Drozdowicz所说,将AppPool用户创建为浏览器角色。缺少的部分是

  1. 用户名(至少在Windows 2012上是'IIS APPPOOL \ pool name'这是将出现在错误页面上的确切名称。在权限对话框中输入时,不要在用户名周围加引号
  2. 必须在主文件夹中创建浏览器角色。当然,如果您需要子文件夹的权限,请确保子文件夹仍然继承权限或手动设置它

答案 4 :(得分:2)

我不想将我的应用程序池设置为LocalSystem,因为我认为这是不好的做法。

对于Microsoft建议(不要使用LocalSystem,请使用ApplicationPoolIdentity),请参阅此处: https://technet.microsoft.com/en-us/library/jj635855.aspx#AppPools

为了证明理由,请看这里: https://stackoverflow.com/a/510225/44169

我遇到了所描述的错误。我已将我的应用程序池标识添加到我的报表服务器文件夹权限,但这被子文件夹的安全设置覆盖。我通过选择子文件夹并单击"恢复到父安全设置"来修复此问题。

答案 5 :(得分:-1)

在IIS应用程序池中,将 ApplicationPoolIdentity 更改为 LocalSystem ,它将得到修复。

默认情况下, ApplicationPoolIdentity无法访问报告服务,即SSRS报告

如果您尚未更改应用程序的身份帐户,则在应用程序中运行报表时,它将使用默认的身份帐户“ ApplicationPoolIdentity”来访问报表服务器。 默认情况下,默认情况下没有访问报表服务器的权限。因此,在您的情况下,此错误是由于应用程序池中的默认标识帐户“ ApplicationPoolIdentity”没有访问权限报表服务器。

有关更多信息,链接:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9593f5a8-09e7-4299-9cf1-5251dd375c38/the-permissions-granted-to-user-iis-apppoolaspnet-v40-are-insufficient-for-performing-this?forum=sqlreportingservices