When building a client application to access a SSL web server, generally you don’t need worry about Certificate issue. However, you need Credentials info. In that case, you can easily use WebClient to download file from SSL web server:
WebClient client = new WebClient(); client.Credentials = new NetworkCredential(uid, password, domain); // or new NetworkCredential(uid, password); client.DownloadFile(URL, fileName);
If the SSL web server does require Certificate info, you can try System.Security.Cryptography.X509Certificates.X509Certificate to instantiate Certificate value and put it into HttpWebRequest object. Then from HttpWebResponse object to get data from server.
WebClient client = new WebClient(); client.Credentials = new NetworkCredential(uid, password, domain); // or new NetworkCredential(uid, password); client.DownloadFile(URL, fileName);
If the SSL web server does require Certificate info, you can try System.Security.Cryptography.X509Certificates.X509Certificate to instantiate Certificate value and put it into HttpWebRequest object. Then from HttpWebResponse object to get data from server.