c# - Disable certification validation on client side of wcf -


i have 2 apps running inside iis - client , service. service running fine, client isn't.

they talk each other thru wcf message security relaying on certificates (it isn't transport security, it's message security). both using self-signed certificates.

but client ends error:

system.identitymodel.tokens.securitytokenvalidationexception: x.509 certificate ... not in trusted people store. x.509 certificate ... chain building failed. certificate used has trust chain cannot verified. replace certificate or change certificatevalidationmode. certificate chain processed, terminated in root certificate not trusted trust provider

i know how disable certificate validation on service side , did it, how can disable ca validation on client side?

if making request server client application, call below lines avoid certification check before making service request.

using code bypass ssl validation error due self signed certificate.

system.net.servicepointmanager.servercertificatevalidationcallback =                 delegate(object sender, x509certificate certificate, x509chain chain, sslpolicyerrors sslpolicyerrors)                 { return true; }; 

note: use testing purpose only, actual application use valid ssl certificate.


Comments

Popular posts from this blog

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -

How to run C# code using mono without Xamarin in Android? -