我在本地机器上创建了一个WCF服务。我的本地机器使用Windows 7 RC1,因此Web服务器是IIS 7.但是,我的生产机器是使用IIS 6的Windows Server 2003.WCF - IIS 6与IIS 7
当我尝试在本地环境中引用服务时,一切正常。但是,当我将我的服务推广到我的生产机器并尝试引用该服务时,我收到错误消息。错误说:
Error: Cannot obtain Metadata from http://www.thedomain.com/theService.svc?wsdl
If 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?wsdl
Metadata 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'..
有什么我需要做的IIS 6中获得WCF服务的工作?我很困惑,为什么它在当地很好地工作,但在生产中不好。
谢谢!
谢谢您的输入。不幸的是,我真的需要获取服务的元数据。 关于分段/生产服务器的争论。目前,我的分段和生产服务器是同一台机器。我在两种环境之间使用不同的IP地址。我只是说“生产”服务器来区分我的环境。 – user70192 2009-08-03 14:24:16
我没有提供任何建议你不应该得到的元数据。你的“分期”环境中是否有同样的问题? – 2009-08-03 14:30:44