I have a SSIS package and a Script Task on Windows Server 2008 R2. This Script Task downloads the file.
As I can download csv file from URL and SSIS visual studio, it should be able to download from job also
System.Net.WebClient myWebClient = new System.Net.WebClient();
string webResource = varCollection["User::RemoteUri"].Value.ToString();
string fileName = varCollection["User::SourcePath"].Value.ToString() + "filename.csv";
myWebClient.DownloadFile(webResource, fileName);
Working Test Case:-
1. If I execute this SSIS package from Visual Studio, then it successfully downloads this file. Here Important note is Im not sending any type of authentication.
System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required. at System.Net.WebClient.DownloadFile(Uri address; String fileName)
I'm struggling this issue from last two days, please help me.
This is very important to resolve this issue.
Thank you in advance.
What I have tried:
I tried to execute SSIS package from Visual Studio and it works but, If I call that SSIS package from Job, then it fails.