SSIS Script componenet Source failing with error The remote server returned an error: (404) Not Found.

Hi All

we need download files from FTP location , so we are using script component as source  and when we are using the fallowing code

// read a file and write out as columns in rows
            WebClient myWebClient = new WebClient();
            myWebClient.Credentials = new NetworkCredential(Variables.ftpLogin, Variables.ftpPassword);

            // Concatenate the domain with the Web resource filename.
            string myStringWebResource = Variables.fileURL + Variables.fileName;

            string s = myWebClient.DownloadString(myStringWebResource);
            StringReader reader = new StringReader(s);

we are getting the fallowing error  The server returned an error: (404) Not Found. are we missing anything in the code.

August 28th, 2015 10:42am

Hi Surendra,

404 is a generic error hinting on inability to establish a connection.

I assume the regular FTP connects.

The question here is why you did not use the stock FTP client.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 3:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics