In the webbrowser I can normally load the following url:
https://security.ultimatxxxx.com:443/Serverstatus.ashx
When I do it with:
Webc
If you just wish to accept all certificates, you'll need to set certificate check, before you make your request:
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
This will accept all certificates.
Although - if you need to actually check the certificate do something like:
ServicePointManager.ServerCertificateValidationCallback =
(sender, certificate, chain, sslPolicyErrors) =>
{
//to check certificate
};
One possible reason might be the fact that some website provide different result to different browser.
You can try to provide the browser information to pretend that the call is from a browser.
var client = new WebClient();
client.Headers["User-Agent"] = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15";
string download = client.DownloadString("https://security.ultimatxxxx.com:443/Serverstatus.ashx");
Or
you have not bind the
completedEvent
of theAysnc
call.