Resolve unable to get meta data from HTTP://XXX/XXX.SVC?WSDL "error

Source: Internet
Author: User
Tags wsdl

Understand the contents of the document, but cannot process it.
-The WSDL document contains links that cannot be resolved.
-An error occurred while downloading ' http://admin-pc/IISHostService/Service1.svc?xsd=xsd0 '.
-The underlying connection is closed: An error occurred while receiving.
-Unable to read from the transport connection: the remote host forced the shutdown of an existing connection.
-The remote host forced the shutdown of an existing connection.
The metadata contains a reference that cannot be resolved: "HTTP://ADMIN-PC/IISHOSTSERVICE/SERVICE1.SVC?WSDL".
The metadata contains a reference that cannot be resolved: "HTTP://ADMIN-PC/IISHOSTSERVICE/SERVICE1.SVC?WSDL".
If the service is already defined in the current solution, try to build the solution, and then add the service reference again.

The error is the error of generating the client code times using svcutil, where the service is deployed on the IIS7, and the process of deployment is completely textbook-style. The service also starts normally, displaying the following

The service has been created.

To test this service, you need to create a client and use it to invoke the service. You can use the SvcUtil.exe tool from the command line to do this using the following syntax:

SvcUtil.exe http://leo-pc/IISHostService/Service1.svc?wsdl Follow the prompts directly with SvcUtil.exe http://admin-pc/IISHostService/ SERVICE1.SVC?WSDL command to generate code, there is the beginning of that error. If you start with the webdevserver of Visual Studio, everything is OK.

After a round of Gu, found that there are many similar situations on the Internet, some say because of the use of the Wshttpbinding protocol, or the metadata is not properly disclosed, but it is not what they say. Later I found an article that said a trap for adding a WCF reference. The situation mentioned in the same as I encountered, the original problem in the right, no wonder that with webdevserver can be very normal operation. Originally when downloading the http://admin-pc/IISHostService/Service1.svc?xsd=xsd0, the browser directly access this URL will be prompted not to find the page. The reason is that users of the IIS process do not have permission to access the Windowstemp directory. Locate the Temp directory, and then locate the Iis_user user and authorize it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.