这可能是因为在HTTPS情况下,服务器证书没有正确配置HTTP.SYS.c#



也许这个问题已经有了,但我认为情况有所不同。我从web配置文件中配置所有必需的东西并安装证书。

我在ASP.NET web API中使用java web服务。SOAP服务配置了相互身份验证。(双向SSL(我有2个Keystore文件。(client.jks和truststore.jks(

我的全部错误:这可能是由于服务器证书在HTTPS情况下,没有使用HTTP.SYS正确配置。这也可能是由于客户端和服务器

WebConfig:

<customBinding>
<binding name="MyBinding">
<textMessageEncoding messageVersion="Soap11"/>
<security authenticationMode="MutualCertificate" enableUnsecuredResponse="true" allowSerializedSigningTokenOnReply="true"
messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
includeTimestamp="false">
</security>
<httpsTransport />
</binding>
</customBinding>

<endpoint behaviorConfiguration="ClientCredentialsBehavior" address="https://abc.bank.dm:9193/Money/Money" binding="customBinding" bindingConfiguration="MyBinding" contract="Ref.Port" name="Port">
<identity>
<dns value="test"/>
</identity>
</endpoint>

<behaviors>
<endpointBehaviors>
<behavior name="ClientCredentialsBehavior">
<clientCredentials>
<clientCertificate findValue="2d73n94087857dndyr874ydr"
storeLocation="CurrentUser"
storeName="My"
x509FindType="FindByThumbprint" />
<serviceCertificate>
<defaultCertificate findValue="d346n32d48938w43d943095d"
storeLocation="CurrentUser"
storeName="TrustedPeople"
x509FindType="FindByThumbprint" />
<authentication certificateValidationMode="None" revocationMode="NoCheck"/>
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>

尝试在客户端和服务器上指定相同的协议。在客户端中添加以下代码:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

以下是参考:TLS 1.2

最新更新