When using WebClient to send request to a HTTPS site, if the site is using a self issued or expired Certificate, it will have the “Invalid Certification” error. So it has to handle that by disabling the SSL check.
System.Net.ServicePointManager.ServerCertificateValidationCallback =
<span class="kwrd">new</span> System.Net.Security.RemoteCertificateValidationCallback(
<span class="kwrd">delegate</span>
{ <span class="kwrd">return</span> <span class="kwrd">true</span>; }
);