Please help to a C# newbie,
I'm trying to download zipped files from HTTPS site with Script task in SSIS. Each "external" zip file contains "internal" zip file, that contains 3 txt files.
After extensive search, i've enhanced the DownloadFileTaskAsync with "await", ".Wait()" and even "while (webClient.IsBusy) but still manage to only download the empty "external" zip file.
Please help me to find a way to download full "external" file in a way it won't be empty, but will contain the "internal" zip and all 3 txt files inside of it:
public async void Main()
{
WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential("myuser", "password", "https://example.com/Login.htm");
webClient.DownloadFileTaskAsync(new Uri("https://example.com/#/FROMsender/EXTERNAL_20160706.zip"), @"C:\temp\Test\EXTERNAL_20160706.zip").Wait();
while (webClient.IsBusy) Thread.Sleep(1000);
Dts.TaskResult = (int)ScriptResults.Success;
}
>