wcf服务上的wsHttpBinding和客户端上的Web参考不起作用 [英] wsHttpBinding on the wcf service and web reference on the client don't work
问题描述
我正在将wsHttpBinding
与WCF服务一起使用.
I am using wsHttpBinding
with a WCF service.
我添加了一个网络参考,并且获得了Web代理(它基于SoapHttpClientProtocol
).
I've added a web reference and I've got the web proxy (it is based on SoapHttpClientProtocol
).
我还尝试使用wsdl.exe
和由wcf服务生成的实际wsdl( http://zzzz/zz.svc?wsdl ).
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'.
为什么客户端(Web代理)不能与我的WCF服务一起使用?
Why doesn't the client (the web proxy) work with my WCF service?
我应该采取什么步骤使它们起作用?
What steps should I take to make them work?
我正在运行.NET FW 3.5和ASP.NET 2.0.
I am running .NET FW 3.5 and ASP.NET 2.0.
推荐答案
使用旧ASMX代理的默认配置,您不能使用在wsHttpBinding
上公开的服务.您必须使用添加服务引用/svcutil或将绑定更改为basicHttpBinding
. wsHttpBinding
的默认配置使用高级安全性,而ASMX不支持.
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.
这篇关于wcf服务上的wsHttpBinding和客户端上的Web参考不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!