x509 证书问题, WCF 客户端和服务器端通信, 能只在WCF 服务器端单方面认证吗? 不想给客户端设证书, 可以的话,config怎么设置...
x509 证书问题, WCF 客户端和服务器端通信, 能只在 WCF 服务器端单方面认证吗? 可以的话,config怎么设置...
现在WCF 程序,双方都设 证书, 通信成功, 如果假设,WCF 客户端很多.我不想认证客户端,只想,客户端认征 WCF 服务器端, 给 WCF 服务器设 证书, config 该怎么设置,,求救!!!!
我尝试了几个方法,不成功,,求救!!!!
现在的相关的 config如下:
服务器端..
<behaviors>
<serviceBehaviors>
<behavior name="WCF.Service1Behavior">
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="ChainTrust"/>
</clientCertificate>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WCF.CustomUserNameValidator,WCF"/>
<serviceCertificate findValue="MyServer" storeLocation="CurrentUser" x509FindType="FindBySubjectName"/>
</serviceCredentials>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
客户端:
<behaviors>
<endpointBehaviors>
<behavior name="NewBehavior">
<clientCredentials>
<clientCertificate findValue="Client1" x509FindType="FindBySubjectName" />
<serviceCertificate>
<authentication certificateValidationMode="None" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>