I have created a WCF service on my local machine. My local machine uses Windows 7 RC1, thus the web server is IIS 7. However, my production machine is a Windows Server 2003 using IIS 6.
When I attempt to reference the service in my local environment, everything works fine. However, when I promote my service to my production machine, and try to reference the service, I receive an error. The error says:
Error: Cannot obtain Metadata from
http://www.thedomain.com/theService.svc?wsdlIf this is a Windows (R) Communication
Foundation service to which you have
access, please check that you have
enabled metadata publishing at the
specified address. For help enabling
metadata publishing, please refer to
the MSDN documentation at
http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI:
http://www.thedomain.com/theService.svc?wsdlMetadata contains a reference that
cannot be resolved:
‘http://www.thedomain.com/theService.svc?wsdl‘.Content Type application/soap+xml;
charset=utf-8 was not supported by
service
http://www.mydomain.com/myService.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’..
Is there something I need to do in IIS 6 to get a WCF service to work? I’m really confused as to why it works fine locally, but not fine in production.
Thank you!
There are 4 possibilities I can think of:
The bindings that are supported by IIS 6 are basicHttpBinding and wsHttpBinding. See:
http://msdn.microsoft.com/en-us/library/cc949086.aspx
Hope this helps