c# - how to set ServicePointManager.ServerCertificateValidationCallback in web.config -
how set in web.config file
servicepointmanager.servercertificatevalidationcallback += (sender, cert, chain, sslpolicyerrors) =>true;
try this;
write code in application_start of global.asax.
it should work..!!!
or
in config file;
<configuration> <system.net> <settings> <servicepointmanager checkcertificatename="false" checkcertificaterevocationlist="false" /> </settings> </system.net> </configuration>
you can visit msdn same.
Comments
Post a Comment