【问题标题】:The HTML document does not contain Web service discovery informationHTML 文档不包含 Web 服务发现信息
【发布时间】:2015-03-03 18:58:26
【问题描述】:

我正在使用 Visual Studio Professional 2012 并尝试通过添加服务引用>高级>添加 Web 引用为 ReportService.asmx 添加 Web 引用。

在 Add Web Reference 对话框中,我输入 ssrs 报告服务的地址,然后单击 GO。网址是,

http://MyServerName/ReportServer/ReportService.asmx

我可以在浏览器中查看 WSDL。

在左侧,它显示了它在 WSDL 中找到的方法。

右侧,添加引用按钮被禁用,出现如下错误:

The HTML document does not contain Web service discovery information.

这可能是什么原因?

【问题讨论】:

    标签: c# asp.net-mvc-4 visual-studio-2012 reporting-services wsdl


    【解决方案1】:

    很晚了,但这对我有帮助: 在浏览器中,打开 url 并在末尾添加“?wsdl”。如果您在序列化期间发生任何异常,则错误将显示在那里,然后您可以解决问题。 在我的例子中,一个新类没有无参数构造函数。

    【讨论】:

      【解决方案2】:

      有一个简单的帖子:

      https://anubhavg.wordpress.com/2008/05/06/how-to-create-a-wsdl-file/

      这回答了问题。

      基本上在 Visual Studio 中运行您的 Web 服务。 启动 Internet Explorer 时,从地址栏中复制 http 地址。 那是迪斯科使用的地址。总命令应该看起来像 迪斯科http://localhost:000000/MyCustomWebServiceFile.asmx

      【讨论】:

        【解决方案3】:

        通过允许访问托管环境中的 Web 服务,我的问题得到了解决。

        <allow users="*" /> 在 web.config 中针对服务。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-06-21
          • 2010-09-05
          • 1970-01-01
          • 2010-09-16
          • 1970-01-01
          相关资源
          最近更新 更多