Read File from FTP server in ASP.NET,MVC, C#

Read File from FTP server in ASP.NET,MVC, C#.̥

Here's a simple working example using your code to grab a file from the Microsoft public FTP servers:

DataTable table = new DataTable();
WebClient request = new WebClient();
request.Credentials = new NetworkCredential(userID, Password);
byte[] newFileData = request.DownloadData(serverIP);
string fileString = System.Text.Encoding.UTF8.GetString(newFileData);

Post A Comment