简体   繁体   中英

The HTML document does not contain Web service discovery information

I am using Visual Studio Professional 2012 and trying to add web reference for ReportService.asmx through Add Service Reference>Advanced>Add Web Reference.

In the Add Web Reference dialog I enter the address to the ssrs report service and click GO. The URL is,

http://MyServerName/ReportServer/ReportService.asmx .

I am able to view the WSDL in my browser.

On the left, it shows me the methods it found in the WSDL.

On the right, the Add Reference button is disabled and the following error appears:

The HTML document does not contain Web service discovery information.

what could be reason for this?

Very late, but this helped me: In a browser, open the url and add "?wsdl" at the end. If you have any exceptions that occurred during serialization, then the error(s) will show there and you can then resolve the problem. In my case a new class did not have a parameter-less constructor.

There is a simple post on:

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

that answers the question.

Basically run your web service in visual studio. When a Internet Explorer is launched copy http address from the address bar. That is the address for disco to use. The total command should look like disco http://localhost:000000/MyCustomWebServiceFile.asmx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM