使用此自定义绑定:
<customBinding> <binding name="NewBinding0"> <textMessageEncoding messageVersion="Soap11" /> <security authenticationMode="MutualCertificate" includeTimestamp="false" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"> <secureConversationBootstrap /> </security> <httpTransport /> </binding></customBinding>
确保将您的合同装饰为仅签署:
[System.ServiceModel.ServiceContractAttribute(ConfigurationName=..., ProtectionLevel=System.Net.Security.ProtectionLevel.Sign)]
除了客户端证书之外,您还需要配置服务证书。您(可能)没有这样的证书,可以在其中配置任何虚拟证书(甚至与客户端相同)。



