C# 停止WCF向SOAP头添加签名
我已将C# 停止WCF向SOAP头添加签名,c#,wcf,soap,C#,Wcf,Soap,我已将ProtectionLevel=ProtectionLevel.None放在我的WCF客户端(调用SOAP服务)的ServiceContract上,但WCF仍在向标头添加签名 [ServiceContract(ConfigurationName = "IMyOutboundService", ProtectionLevel = ProtectionLevel.None)] 如何关闭此客户端的标头签名 我正在使用带有authenticationMode=“MutualCertificate
ProtectionLevel=ProtectionLevel.None
放在我的WCF客户端(调用SOAP服务)的ServiceContract
上,但WCF仍在向标头添加签名
[ServiceContract(ConfigurationName = "IMyOutboundService", ProtectionLevel = ProtectionLevel.None)]
如何关闭此客户端的标头签名
我正在使用带有authenticationMode=“MutualCertificate”
的customBinding
,并且我已经设置了
。我可以使用不同的绑定,只要允许
以下是当前绑定的全部内容:
<binding name="MyBinding" openTimeout="00:00:10" sendTimeout="00:00:10" >
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<security authenticationMode="MutualCertificate"
includeTimestamp="true"
enableUnsecuredResponse="true">
<localClientSettings timestampValidityDuration="00:15:00"/>
</security>
<httpsTransport
manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="5242880" allowCookies="false"
bypassProxyOnLocal="true" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="5242880"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="true" />
</binding>
我已经让它工作了,很辛苦
<binding name="MyBinding" openTimeout="00:00:10" sendTimeout="00:00:10" >
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<httpsTransport
manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="5242880" allowCookies="false"
bypassProxyOnLocal="true" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="5242880"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="true" />
</binding>
因此,通过保留自定义绑定,而不是切换到基本绑定(我确实尝试过),您可以保留Soap11WSAddressing10(即,您可以获得所有SOAP头)
通过删除
我已经让这一个工作了,很难
<binding name="MyBinding" openTimeout="00:00:10" sendTimeout="00:00:10" >
<textMessageEncoding messageVersion="Soap11WSAddressing10" />
<httpsTransport
manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="5242880" allowCookies="false"
bypassProxyOnLocal="true" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="5242880"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="true" />
</binding>
因此,通过保留自定义绑定,而不是切换到基本绑定(我确实尝试过),您可以保留Soap11WSAddressing10(即,您可以获得所有SOAP头)
到目前为止,通过删除,我的研究表明,如果您使用的是“MutualCertificate”身份验证模式,则无法关闭签名。。。因此,如果有人知道这是否属实,那么这方面的确认或证据也会很有用!你能有一个SOAP监听器,截取消息并实际删除标题吗?我的意思是来自标题的签名来自回忆-perty如果你使用mutualcert,你必须对标题进行签名…否则我想你会说“我的邮件是经过签名/加密的,因此是可验证的,我的邮件头没有签名,因此不信任它…因此不信任它的邮件”我想你可以使用basicHttpBinding,或者使用MessageContract,并将ProtectionLevel放入[MessageHeader]中到目前为止,我的研究表明,如果您使用的是“相互认证”,则无法关闭签名“身份验证模式。。。因此,如果有人知道这是否属实,那么这方面的确认或证据也会很有用!你能有一个SOAP监听器,截取消息并实际删除标题吗?我的意思是来自标题的签名来自回忆-perty如果你使用mutualcert,你必须对标题进行签名…否则我想你会说“我的邮件是经过签名/加密的,因此是可验证的,我的邮件头没有签名,因此不信任它…因此不信任它的邮件”我认为您可以使用basicHttpBinding,或者可能使用MessageContract并将ProtectionLevel放入[MessageHeader]属性中。