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 WebClient = New WebClient()
Dim wp As WebProxy = New WebProxy("[IP number of our proxy server]", [port number of our proxy server])
wp.Credentials = CredentialCache.DefaultCredentials
client.Proxy = wp
client.DownloadFile("http://sstatic.net/so/img/logo.png", "c:\logo.png")
This works.
How do I change this code to download a file that is stored on an HTTPS-server? I guess it has something to do with adding credentials or something.