wsHttpBinding on the wcf service and web reference on the client don't work

こ雲淡風輕ζ 提交于 2019-12-11 00:27:42

问题


I am using wsHttpBinding with a WCF service.

I've added a web reference and I've got the web proxy (it is based on SoapHttpClientProtocol).

Also I've tried to build a proxy using wsdl.exe and the actual wsdl generated by the wcf service (http://zzzz/zz.svc?wsdl).

When the client calls the service, I get the following error:

The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/Service1/Operation1'.

Why doesn't the client (the web proxy) work with my WCF service?

What steps should I take to make them work?

I am running .NET FW 3.5 and ASP.NET 2.0.


回答1:


You cannot consume service exposed on wsHttpBinding with default configuration by old ASMX proxy. You must either use add service reference / svcutil or change your binding to basicHttpBinding. Default configuration of wsHttpBinding uses advanced security and ASMX doesn't support it.



来源:https://stackoverflow.com/questions/6649588/wshttpbinding-on-the-wcf-service-and-web-reference-on-the-client-dont-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!