Reputation: 51
How do I set this in web.config file
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) =>true;
Upvotes: 5
Views: 11060
Reputation: 2366
Try this;
Write your 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 also VISIT MSDN for the same.
Upvotes: 5