Last post Jan 02, 2015 03:50 AM by Shawn - MSFT
Dec 30, 2014 12:41 AM|itismesa|LINK
I created a wcf webservice and it is working fine on my PC. I hosted on IIS 6 on windows 2003 and tested from wcftestclient.ext on my PC and it works.
When I moved it to Windows 2008 server with IIS7 in the same network and test again it gives me the following error :
"Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata."
Here is how the config file looks like
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<endpoint address="mciservice" binding="basicHttpBinding" contract="MCIServiceLibrary.IMCIService">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<add baseAddress="http://server3" />
Dec 30, 2014 06:42 AM|itismesa|LINK
I think I am missing some settings on the IIS or Windows 2008 it self
I created a simple webservice to return only HelloWord string and Hosted in IIS on windows 2008
In order to test it I created a windows form application and tried to add service reference to it but it also gives me error and here is the complete message:
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://localhost/HelloService/HelloService.svc?xsd=xsd0'.
- The underlying connection was closed: An unexpected error occurred on a receive.
- Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
- An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: 'http://localhost/HelloService/HelloService.svc?wsdl'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost/HelloService/HelloService.svc?wsdl. 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.
pls help me out
Jan 02, 2015 03:50 AM|Shawn - MSFT|LINK
First, you need make sure the service is running. And you could try whether you can access to the service from browser or not.
Besides, it seems that you can not able to add service properly which indicates it's a permission related issue.
For more information, you could refer to: