【问题标题】:the request failed with http status 401 unauthorized ssrs请求失败,http 状态 401 未经授权的 ssrs
【发布时间】:2012-11-27 15:55:50
【问题描述】:

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

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

{System.Net.WebException:请求失败,HTTP 状态 401:未经授权。 在 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods() 在 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(字符串方法名称) 在 Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetConnectionSSLForMethod(字符串方法名称) 在 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(字符串报告,字符串 HistoryID) 在 Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() 在 Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 参数) 在 Microsoft.Reporting.WebForms.Report.SetParameters(ReportParameter 参数) 在 CustomerWtrEff.aspx.cs:line 98 中的 Reports_CustomerWtrEff.GetReports(String SampleCodes, String lstSampleCode) }

【问题讨论】:

标签: asp.net sql-server-2008 reporting-services


【解决方案1】:

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

参考: 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。 KB article 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 报告现在可以正常工作了。

【讨论】:

  • @Andy Pineda 感谢分享上述链接。我已经尝试过了,但我仍然收到 401 错误。如果还有其他选择,请提前分享............谢谢
  • @DattaSalunkhe 如果不是解决方案,您不应该将其标记为正确。我也试过了,这对我也不起作用。
【解决方案2】:

我遇到这个问题,尝试了越来越多,终于发现

  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();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-01-01
    • 1970-01-01
    • 2012-06-30
    • 1970-01-01
    • 2011-03-18
    • 2012-05-03
    相关资源
    最近更新 更多