I would like to download a file using VB.NET (preferably) or C# via HTTPS.
I have this code to download a file over plain HTTP:
Dim client As WebClie
Try something like this
WebClient wc = new WebClient();
wc.UseDefaultCredentials = false;
CredentialCache creds = new CredentialCache();
creds.Add(new Uri(url), "Basic",new NetworkCredential(username, password, domain));
wc.Credentials = creds;
wc.Headers.Add(HttpRequestHeader.UserAgent,"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;");
//wc.Headers["Accept"] = "/";
wc.DownloadFile(url,localpath);