我们有一个托管在 IIS 中的 WCF 服务,具有以下customBinding。该服务接收来自 IBM Datapower 的加密和签名请求。该服务可以验证签名并很好地解密请求。但是发出的响应没有加密或签名。(我可以使用 WCF 日志记录来验证这一点)
<customBinding>
<binding name="myCustomBinding">
<textMessageEncoding messageVersion="Soap11" />
<httpsTransport requireClientCertificate="false" realm="" />
</binding>
</customBinding>
<behaviors>
<serviceBehaviors>
<behavior name="myServiceBehavior">
<serviceCredentials>
<serviceCertificate findValue="{serverCertificateName}" x509FindType="FindBySubjectName"
storeLocation ="LocalMachine" storeName ="My"/>
<clientCertificate>
<certificate findValue="{clientCertificateName}" x509FindType="FindBySubjectName"
storeLocation ="LocalMachine" storeName ="My" />
<authentication certificateValidationMode="None" includeWindowsGroups="false"/>
</clientCertificate>
</serviceCredentials>
</behavior>
</serviceBehaviors></behaviors>
MessageContracts 的 ProtectionLevel 设置为ProtectionLevel.EncryptAndSign
我在这里错过了什么吗?