Click here to Skip to main content
15,884,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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


C#
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.

C#
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.
Posted
Comments
dan!sh 16-Feb-16 3:50am    
My guess would be, the account under which the job runs needs to be authenticated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900