C# WCF-服务引用登录失败,因为soap版本
当我尝试登录到WCF时,会收到错误消息:C# WCF-服务引用登录失败,因为soap版本,c#,web-services,wcf,soap,C#,Web Services,Wcf,Soap,当我尝试登录到WCF时,会收到错误消息: An exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll but was not handled in user code Additional information: The envelope version of the incoming message (Soap12 (http://www.w3.org/2003/05/
An exception of type 'System.ServiceModel.CommunicationException' occurred in mscorlib.dll but was not handled in user code
Additional information: The envelope version of the incoming message (Soap12 (http://www.w3.org/2003/05/soap-envelope))
does not match that of the encoder (Soap11 (http://schemas.xmlsoap.org/soap/envelope/)).
Make sure the binding is configured with the same version as the expected messages.
我试图按建议解决它
通过替换:
<basicHttpBinding>
<binding name="LoginServiceSoap" />
</basicHttpBinding>
谢谢。
basicHttpBinding
是SOAP1.1。声明对于EnveloperVersion
的此绑定,唯一有效的值是“Soap11”
wsHttpBinding
是SOAP 1.2。尝试使用它而不是basicHttpBinding
:
<wsHttpBinding>
<binding name="LoginServiceSoap" />
</wsHttpBinding>
从
basicHttpBinding
(即SOAP 1.1)切换到wsHttpBinding
(即SOAP 1.2),或使用自定义绑定。
the "envelopeVersion"attribute is not allowed
<wsHttpBinding>
<binding name="LoginServiceSoap" />
</wsHttpBinding>