HTTPS file download C#
<p>I have the need to download a file that is hidden behind an HTTPS connection.</p>

<p>I am new to the downloading of files that are sitting behind a secure website, I have tried  using credentials to fix this problem but to no avail.</p>

<p>From what I have read, you need to create and use a certificate to complete this, but I have found no examples. Any help is appreciated.</p>

<p>This is what I have for now:</p>

<pre><code>        WebClient dove = new WebClient();
        CredentialCache mycache = new CredentialCache();
        dove.Credentials = new NetworkCredential("user", "pass"); ;
        dove.DownloadProgressChanged += new DownloadProgressChangedEventHandler(dove_DownloadProgressChanged);
        dove.DownloadFileCompleted += new AsyncCompletedEventHandler(dove_DownloadFileCompleted);
        dove.DownloadFileAsync(new Uri("http://secure.website.com/File/Default.aspx"), "file.xls");
</code></pre>

<p>Could someone provide me with an example on how to complete this, thank you.</p>
