Posted on: 5/21/2013 10:20:33 PM | Views : 232

Hi all, 
I am downloading a zip file from FTP server and if the file size is less than 2 gb i can able to get the zip file content and if the file is more than 2 gb i could get only half of the file. The files i get is an XML files before compression the size is 150 MB and after extracting the file size is more than 2 GB. Please help me, here is my code 
FtpWebResponse response; FtpWebRequest request = (FtpWebRequest)WebRequest.Create(path); request.KeepAlive = false; request.UseBinary = true; request.Method = WebRequestMethods.Ftp.DownloadFile; // This example assumes the FTP site uses anonymous logon. request.Credentials = new NetworkCredential(username, password); response = (FtpWebResponse)request.GetResponse(); Stream responseStream = response.GetResponseStream();
 GZipStream gz =new GZipStream(responseStream,CompressionMode.Decompress);
int buffersize = 4092; int readcount;
Go to the complete details ...