Asp.net
訪問報表伺服器的 AppPool 權限問題
我有一個在 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 的多台機器上執行良好。我一直在嘗試基於網路搜尋的許多不同的東西,但還沒有找到解決方案。對此的任何見解將不勝感激。
終於想通了。我的 Reporting Services 配置為本地帳戶,而我的 IIS 應用程序池配置為 ApplicationPoolIdentity。我將我的應用程序池更改為 LocalSystem 並修復了它。希望這些資訊對其他人有用,因為我浪費了幾個小時來弄清楚這一點。
mreyeros 在評論中提出的另一個解決方案是在報告管理器中將瀏覽器權限授予 IIS APPPOOL\DefaultAppPool 使用者。
為此,您應該在主文件夾中打開報表管理器網站 (http:///Reports),點擊文件夾設置 -> 安全,點擊新角色分配並輸入 IIS APPPOOL\DefaultAppPool 作為名稱,從列表中選擇權限。