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
You just need to point that address to your HTTPS resource and to inform your credential:
client.Credentials = new NetworkCredential("username", "password");
client.DownloadFile("https://your.resource.here", @"localfile.jog")
You're talking about how to log into a site protected by a HTML form login. I wrote this code sometime ago and you could to adapt it to login into your remote site: Orkut Login Code
Things you need to keep in mind:
__EVENTTARGET
and __EVENTARGUMENT
values, as they're required to process your login postback. If it's not, skip this step.CookieContainer
. It keeps your login cookie, so subsequent calls uses that authenticated context.