Following code:
WebClient client = new WebClient();
client.DownloadProgressChanged += DownloadProgressChanged;
client.DownloadFileCompleted += DownloadFileCompleted;
client.DownloadFileAsync(new Uri(downloadUrl), downloadPath);
works fine in .NET 4.5 - it downloads the file without any issues, however in .NET 3.0 or 3.5 it doesn't work - the file shows 0kb.
Would anybody know why the discrepancy? I am wondering whether there are some additional headers missing from 3.0 that 4.5 has included?
It also doesn't throw any errors.
UPDATE:
Eventually throws "The operation has timed out." exception.
UPDATE #2:
I changed from HTTPS to HTTP and this seems to have worked in my particular case. In actual fact, my HTTP call redirected it to HTTPS. However, by going directly to HTTPS has not worked for me with .NET 3.0.