【发布时间】:2020-10-30 21:56:11
【问题描述】:
自签名证书用于 WCF 应用程序中的身份验证。指定的服务器:
<security mode="Message">
<message clientCredentialType="Certificate"/>
</security>
...
<clientCertificate>
<authentication certificateValidationMode="PeerOrChainTrust" revocationMode="NoCheck"/>
</clientCertificate>
证书已在客户端正确启用:
<endpointBehaviors>
<behavior name="wsHttpCertificateBehavior">
<clientCredentials>
<clientCertificate findValue="<Thumbprint>" storeName="My" storeLocation="LocalMachine" x509FindType="FindByThumbprint"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
在客户端,证书被添加到受信任的根证书中。调用服务方法时出现错误:调用用户的身份未经服务验证。我不明白您还需要指定什么进行验证。如果您删除证书并指定
<security mode= "None"/>
调用服务方法时客户端挂起。我不明白为什么。我已经为此奋斗了一周。请帮帮我!
【问题讨论】: