SSRS显示身份验证错误

时间:2013-12-19 15:42:55

标签: asp.net reporting-services

我正在运行报表服务器(SSRS),我在ASP应用程序中调用报表。每当我尝试通过站点本身加载报告时,它会向我显示HTTP 401错误,无论是本地还是通过域访问。如果我在ReportServer本身打开报告,我可以打开它们,问题是通过网页加载。我尝试更改数据源本身的凭据,但一切都很好,切换了SQL用户凭据和Windows身份验证,没有任何帮助。任何帮助将不胜感激,因为我不知道该怎么做。

这是本地服务器错误:

[WebException: The request failed with HTTP status 401: Unauthorized.]
  Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods() +232
Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname) +60
 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetConnectionSSLForMethod(String methodname) +16
     Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.ProxyMethodInvocation.Execute(RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1  retryMethod) +831
Microsoft.Reporting.WebForms.SoapReportExecutionService.LoadReport(String report, String historyId) +34
Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() +175
Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters) +162
 System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

ASPX Codebehind:

 ReportViewer1.ServerReport.ReportServerUrl = new System.Uri("serveradress");
            ReportViewer1.ServerReport.ReportPath = "/TrialBalance";
            Microsoft.Reporting.WebForms.ReportParameter[] Param = new Microsoft.Reporting.WebForms.ReportParameter[1];
            Param[0] = new Microsoft.Reporting.WebForms.ReportParameter("ID", Convert.ToString(Session["BranchID"]));

            ReportViewer1.ShowParameterPrompts = false;
            ReportViewer1.ServerReport.SetParameters(Param);
            ReportViewer1.ServerReport.Refresh();

尝试! 1)获得AppPool LocalSystem权限

2)我可以使用domain.com/ReportServer或localhost / ReportServer访问Reportserver,问题只发生在ASP应用程序中。

3)已验证的SSRS服务帐户权限。

4)DataSource连接没有问题。

5)一周前报告工作没有问题,我将服务器映像迁移到另一个功能更强大的服务器,我相信这是因为它被破坏但我不知道图像是如何相同的。没有改变。

6)我可以在本地开发计算机中调用ReportServer(Report Loads和all),该计算机的目标是远程服务器。如果我在网站上访问相同的ASPX,它会给我HTTP 401错误

7)改变编程直接瞄准localhost ......这是错误:

An error has occurred during report processing. (rsProcessingAborted)
    Cannot create a connection to data source 'DataSource1'. (rsErrorOpeningConnection)
        Cannot open database "CoopBranches" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\SYSTEM'.

这很奇怪,因为我正在测试数据源,它正在连接而没有任何问题。

1 个答案:

答案 0 :(得分:1)

几天前我遇到了同样的问题,这里有一些基于我在我的工作上做出的建议。

  1. 在您的应用程序池上尝试指示/模拟域用户,然后在服务器上授予该报告权限。
  2. 这个给出了很大的不同。尝试查看ReportViewer1正在解决的问题,我注意到,如果您的应用程序进入
  3. <强>的http:// {YourReportServerURL} /ReportServer/Pages/ReportViewer.aspx?/ {YourReportName}&安培; {参数1} = {ParamValue}

    然后,您将遇到多跳身份验证问题,因为URL重定向到最终解析为的另一个URL,在不使用Kerberos时丢失过程中经过身份验证的用户

    <强>的http:// {YourReportServerURL} /的ReportServer / {YourReportFolder} / {YourReportName}&安培; {参数1} = {ParamValue}

    如果是这种情况,请尝试手动生成URL

    <强>的http:// {YourReportServerURL} /的ReportServer / {YourReportFolder} / {YourReportName}&安培; {参数1} = {ParamValue}

相关问题