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

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -