简体   繁体   中英

Unable to add a Service Reference to a WCF service that is hosted locally

I have successfully created my service, I have modified it ever so slightly so that it does a little more than the bog standard "Hello World".

The service compiles and runs and give me the following address to add into my client application:

127.0.0.1:81/Appointments.svc

When I follow the next tutorial in the series: https://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-ssl-certificate/

During step 5, when I add the reference to the service, it gives me the following error message:

An error (Details below) occurred while attempting to find services at '127.0.0.1:81/Appointments.svc'

Metadata contains a reference that cannot be resolved: '127.0.0.1:81/Appointments.svc?wsdl'.

The WSDL document contains links that could not be resolved.

There was an error downloading '127.0.0.1:81/Appointments.svc?xsd=xsd0'.

The underlying connection was closed: The connection was closed unexpectedly.

Metadata contains a reference that cannot be resolved: '127.0.0.1:81/Appointments.svc'.

Content Type application/soap+xml; charset=utf-8 was not supported by service 127.0.0.1:81/Appointments.svc. The client and service bindings may be mismatched.

The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..

If the service is defined in the current solution, try building the solution and adding the service reference again.

I guess it might be some permission issues. Can you try to grant permissions on C:\\Windows\\Temp and see if that resolves your problem. The account that is associated with your apppool under which the service is running needs to have permissions on this folder.

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