Get file in Byte Array

Dec 23, 2010 at 10:20 PM

I want to read the file from FTP server in Byte[]. How can I do it. I tried

Snippet

FTPSteream stream = FTPClient.GetFile("XYZ");;

byte
[] databuffer = new byte[stream.Length];

stream.Read(databuffer,) 

int i = stream.Read(databuffer, 0, stream.r);

It says seek operation not allowed.

 

Thanks,

Coordinator
Mar 2, 2011 at 11:44 PM

Hi,

just look in the sources of the command line app for a sample.

 

Cheers,

Alessandro Pilotti

[ MVP / IIS ]