2009-11-13 119 views
0

我创建了一个非常简单的WCF类库,并将此项目添加到具有Web项目的解决方案。我从web项目中添加了对该服务的引用。在本地,一切都按预期工作。将WCF服务部署到共享主机环境

当我向我的托管服务提供商复制站点时,出现各种错误。目前我有这个错误:

Parser Error Message: The binding at system.serviceModel/bindings/wsHttpBinding does not have a configured binding named 'WSHttpBinding_IService1'. This is an invalid value for bindingConfiguration. 

Line 146: </bindings> 
Line 147: <client> 
Line 148: <endpoint address="http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/" 
Line 149: binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1" 
Line 150: contract="ServiceReference1.IService1" name="WSHttpBinding_IService1"> 

将WCF服务部署到共享主机的正确方法是什么?

感谢

回答

1

最有可能的配置 - 为你的错误真的说:

Parser Error Message: The binding at system.serviceModel/bindings/wsHttpBinding does not have a configured binding named 'WSHttpBinding_IService1'. This is an invalid value for bindingConfiguration.

它正在寻找与“WSHttpBinding_IService1”的名称绑定配置,并没有发现它。

检查你的配置文件(IIS托管的web.config,自托管的app.config) - 它包含它需要的所有设置吗?最有可能不是.....

+0

我不知道从哪里开始寻找。我完全是WCF的noob。我应该发布web.config文件的哪些部分,以供人们了解哪些内容可能会出错? – Nick 2009-11-13 14:22:26

+0

WCF配置是''节中的一切 – 2009-11-13 16:12:47