2009-11-13 128 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