asp.net - Ssl System.Security.Authentication.AuthenticationException: -


i have web service , working when test when try use inside of client application self created ssl certificate getting error

the remote certificate invalid according validation procedure.

description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code.

system.security.authentication.authenticationexception 

i have read many documents , made research effort nothing can solve problem yet. appriciated if 1 helps

since ssl certificate self-signed, must custom validate certificate. if have added certificate trusted ceritifcate store, still need this.

this off top of head, think should this:

servercertificatevalidationcallback += new remotecertificatevalidationcallback(validateremotecertificate);  private bool validateremotecertificate(object sender, x509certificate cert, x509chain chain, system.net.security.sslpolicyerrors sslpolicyerrors) { //use sslpolicyerrors check error certificate.  //validate certificate. //check hash mitm attack.  //decide if good, return true, else return false. return true; } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -