HTTPS上的WCF自定义绑定
在这种情况下,我需要签署带有X509证书的soap请求,以供java web服务使用。通过WCF的魔力,我们能够正确地形成信封,并且在标准http上看起来都很棒。然而,一旦我们移动到客户端所需的HTTPS,我们就开始接收到错误,即无法为具有权限的SSL/TLS安全通道建立信任关系。。我们尝试调整一些设置,并将目标域更改为其他已知的HTTPS站点,但仍然收到相同的错误。下面是我们的客户端配置,非常感谢HTTPS上的WCF自定义绑定,wcf,web-services,custom-binding,Wcf,Web Services,Custom Binding,在这种情况下,我需要签署带有X509证书的soap请求,以供java web服务使用。通过WCF的魔力,我们能够正确地形成信封,并且在标准http上看起来都很棒。然而,一旦我们移动到客户端所需的HTTPS,我们就开始接收到错误,即无法为具有权限的SSL/TLS安全通道建立信任关系。。我们尝试调整一些设置,并将目标域更改为其他已知的HTTPS站点,但仍然收到相同的错误。下面是我们的客户端配置,非常感谢 <?xml version="1.0"?> <configuration>
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding
name="myCustomBinding"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00">
<textMessageEncoding
messageVersion="Soap11" />
<security
allowInsecureTransport="true"
authenticationMode="MutualCertificate"
requireDerivedKeys="false"
keyEntropyMode="ClientEntropy"
includeTimestamp="false"
securityHeaderLayout="Lax"
messageProtectionOrder="SignBeforeEncrypt"
messageSecurityVersion="WSSecurity10WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10">
<secureConversationBootstrap />
</security>
<httpsTransport />
</binding>
</customBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="wsHttpCertificateBehavior">
<clientCredentials>
<clientCertificate
findValue="MyCertName"
storeLocation="LocalMachine"
x509FindType="FindByIssuerName"/>
<serviceCertificate>
<authentication
revocationMode="NoCheck"
trustedStoreLocation="LocalMachine" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<client>
<endpoint
address="https://www.SomeUrl.com"
binding="customBinding"
bindingConfiguration="myCustomBinding"
behaviorConfiguration="wsHttpCertificateBehavior"
contract="ServiceReference1.ServiceTest"
name="untk48_dfSoap">
<identity>
<certificateReference findValue="MyCertName" storeLocation="LocalMachine" x509FindType="FindByIssuerName"/>
</identity>
</endpoint>
</client>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
您的证书友好名称是否与https的域名匹配 我过去必须做些什么才能让HTTPS WCF正确验证 e、 g 友好名称box1.mycompany.au.net
域请求在客户端上安装证书,您将不会遇到此问题。 安装时,请确保将其安装到中间证书颁发机构和受信任的根证书颁发机构
对我有效。这可能对您有效,但这并不意味着将任何旧证书安装到任何CA存储中都是正确的做法。