system.serviceModel / bindings / wsHttpBinding中的绑定没有…错误

我试图在我的WCF基于Web的服务中包含两个端点 – wsHttp和netTcp。 如下面的Web.config所示,我添加了它们,但是当我编译并在Web浏览器中单击Service.svc时收到以下错误:

错误页面:

 Server Error in '/MyService' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The binding at system.serviceModel/bindings/wsHttpBinding does not have a configured binding named 'wsHttpBinding'. This is an invalid value for bindingConfiguration. Source Error: Line 16:  Line 17:  Line 18: <endpoint address="http://localhost:8090/Services/MyService" Line 19: binding="wsHttpBinding" Line 20: bindingConfiguration="wsHttpBinding" Source File: C:\MyService\web.config Line: 18 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 

Web.config文件:

                                     

拿出来:

  bindingConfiguration="wsHttpBinding" 

从这里:

 address="http://localhost:8090/Services/MyService" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" 

我不认为你已经正确回答了这个问题我确定他想要实现一个绑定配置,所以不要删除bindingConfiguration="wsHttpBinding ,只要确保你和点中的绑定与配置文件中的绑定相匹配希望这会奏效

例如: