0

我正在使用 Asp.net & c# 开发一个 Web 应用程序。要生成报告,我正在使用 SQL Server 商业智能开发工作室(ssrs)。我收到类似“请求失败,http 状态 401 未授权”之类的错误,请帮助我提前感谢实际错误如下

ex = {“请求失败,HTTP 状态 401:未授权。”}

{System.Net.WebException:请求失败,HTTP 状态 401:未经授权。在 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname) 在 Microsoft.Reporting.WebForms.Internal 的 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods() .Soap.ReportingServices2005.Execution.RSExecutionConnection.SetConnectionSSLForMethod(String methodname) at Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection 连接,ProxyMethod1 initialMethod, ProxyMethod1 retryMethod) 在 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID) 在 Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() 在 Microsoft.Reporting.WebForms.ServerReport.SetParameters (IEnumerable`1 参数) 在 Microsoft.Reporting.WebForms.Report.SetParameters(ReportParameter 参数) 在 Reports_CustomerWtrEff.GetReports(String SampleCodes, String lstSampleCode) 在 CustomerWtrEff.aspx.cs:line 98}

4

2 回答 2

3

查看下面的此链接,因为它可以为您的问题提供答案。

参考: http ://www.taznetworks.com/rss/2006/03/crm-30-sbe-sql-reporting-error.html

编辑:

在最近对 CRM 进行一些测试安装时,我们不断出现错误“安装程序无法验证指定的 Reporting Services 报告服务器https://server.xxx.com/ReportServer。错误:请求失败,HTTP 状态 401 : 未经授权。

这似乎是一个非常普遍的问题,但对这些问题的回应并不多。我可以说的一件事是 CRM 是一个很好的产品,但人的内心是复杂的。对于胆小的人来说,这是肯定的,尤其是在涉及 SQL 和 SQL 报告服务时。

无论如何回到问题。在大多数使用 CRM 3 和 SBS 的情况下,Anne Stanton等网站上的文档显示 ISA 存在问题。我们正在建造的这个盒子还没有 ISA(到目前为止)。

我们遇到的问题似乎更多地与 Windows Server 2003 的 SP1 相关。知识库文章 896861似乎是正确的。我们根据文章做了以下操作:

  1. 单击开始,单击运行,键入 regedit,然后单击确定。
  2. 在注册表编辑器中,找到并单击以下注册表项:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. 右键单击 Lsa,指向新建,然后单击 DWORD 值。
  4. 键入 DisableLoopbackCheck,然后按 Enter。
  5. 右键单击 DisableLoopbackCheck,然后单击修改。
  6. 在数值数据框中,键入 1,然后单击确定。
  7. 退出注册表编辑器,然后重新启动计算机。

这样做使我们能够访问https://servername/reports并显示完整的 SQL Reporting Services 网站。CRM 报告现在可以按预期工作。

于 2012-12-13T20:17:25.190 回答
0

我遇到了这个问题并尝试了越来越多,最后发现

  1. 打开报告服务配置并连接到服务器然后打开 Web 服务 url 你会发现 url 复制它(URL

  2. 打开您的 SQL Server 数据工具项目,在项目属性中,目标服务器 URL 是报告服务配置中提到的URL,目标报告文件夹是项目的名称

  3. 在您的 asp.net 项目中,您将编写以下代码:

.

ReportViewer1.ProcessingMode = 
Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri(**URL**);
ReportViewer1.ServerReport.ReportPath = String.Concat(**target report folder**, "name of the report ");
ReportViewer1.ServerReport.Refresh();
于 2017-09-21T13:16:45.203 回答