none
WCF service gives 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'..

    Question

  • hi,

    When I add reference to a WCF service which is hosted in my machine with IIS7, i am getting the following error. But I can consume the WCF service from Visual Studio. The error is popped up during addidng the Service Reference to the Project. Is there anything need to be added to the Mime Types in IIS?

    Metadata contains a reference that cannot be resolved: 'http://192.168.0.15:85/SampleApplication/MediaService.svc?wsdl'.
    The WSDL document contains links that could not be resolved.There was an error downloading 'http://192.168.0.15:85/SampleApplication/MediaService.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 hostMetadata contains a reference that cannot be resolved: 'http://192.168.0.15:85/SampleApplication/MediaService.svc'.Content Type application/soap+xml; charset=utf-8 was not supported by service http://http://192.168.0.15:85/SampleApplication/MediaService.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'..

    Please help.

    Thanks

    Vince


    Best Regards Vince
    Thursday, July 28, 2011 8:46 AM

All replies