我继承了一个我不太了解的c#应用程序。当我构建并发布它时,我收到以下错误:
The binding at system.serviceModel/bindings/basicHttpBinding does not have a
configured binding named 'BasicHttpBinding_ILan_Structure_WCFService'.
This is an invalid value for bindingConfiguration.
这是我的网络配置中的代码:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ILan_Structure_WCFService">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint
address="https://website.com/Lan_Structure/Lan_Structure_WCFService.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ILan_Structure_WCFService"
contract="Lan_Structure_WCFService.ILan_Structure_WCFService"
name="BasicHttpBinding_ILan_Structure_WCFService"/>
</client>
</system.serviceModel>
我认为我并不完全理解这个错误,因为我在谷歌搜索之后认为它是专门针对这一部分的:
<basicHttpBinding>
<binding name="BasicHttpBinding_ILan_Structure_WCFService">
<security mode="Transport" />
</binding>
</basicHttpBinding>
所以我觉得这里有一个错字,事实并非如此!
bindingConfiguration="BasicHttpBinding_ILan_Structure_WCFService"
我试过读这些:
https://msdn.microsoft.com/en-us/library/ms733099(v=vs.110).aspx
The binding at system.serviceModel/bindings/wsHttpBinding does not have a configured binding
我已尝试根据此问题删除对绑定配置的引用:
The binding at system.serviceModel/bindings/wsHttpBinding does not have... error
但我有点失落。任何帮助将不胜感激!!!还有谁知道我在哪里可以读取假人或类似的绑定?我可以阅读这篇文章!
答案 0 :(得分:0)
只是为了一个偶然发现它的人。代替
<basicHttpBinding>
使用<webHttpBinding>
。这应该解决问题。