在IIS 7.5中部署WCF服务
我是WCF的新手。 我期待步骤在IIS上部署WCF并使用该服务。 我遵循与在IIS上部署网站相同的步骤,也将默认文档设置为Service1.svc
现在当我尝试使用这个wcf服务时,它给了我以下错误。
Metadata contains a reference that cannot be resolved: 'http://manish-pc:8000/Service1.svc?wsdl'. The WSDL document contains links that could not be resolved. There was an error downloading 'http://manish-pc:8000/Service1.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:8000/Service1.svc'. Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost:8000/Service1.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.
Follwing是我在Web.Config文件中的服务详细信息
请指导我缺乏的地方以及采取的措施。 谢谢。
在搜索谷歌和观看video后。 最后我得到了解决方案。
由于我没有打扰的IIS配置,会发生此错误。
- 打开IIS管理器控制台。
- 建立一个单独的应用程序池。
一个)。 将.NET Framework版本设置为4.0
B)。 托管管道模式:经典 - 将Applicaiton池标识设置为“LocalSystem”。
- 按照与在IIS上部署Web应用程序相同的步骤(如创建虚拟目录)。
- Creatig虚拟目录设置您创建的应用程序池。
并在客户端应用程序中使用WCF服务。
点击这里观看video
如果您对此有更多了解,请更新此问题/答案主题。
谢谢 :)