Thanks for your response Nagy. I have modified my code to use BinaryReader. I'm still able to transfer the files, but they end up being ~60% the size of the originals. I'm still unable to view the files due to corruption. Please can you advise whether my code is trying to do the right thing or not (see below)?
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://ftpuser...etc");
request.UsePassive = true;
request.UseBinary = true;
request.Method = WebRequestMethods.Ftp.UploadFile;
request.Credentials = new NetworkCredential("username", "password");
BinaryReader br = new BinaryReader(File.Open(fileLocalDir, FileMode.Open));
FileInfo info = new FileInfo(fileLocalDir);
byte\[\] testArray = new byte\[info.Length\];
int i;
for (i = 0; i < info.Length; i++)
{
testArray\[i\] = br.ReadByte();
}
request.ContentLength = i;
try
{
Stream requestStream = request.GetRequestStream();
requestStream.Write(testArray, 0, i);
requestStream.Close();
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
response.Close();
}
Regards, Anthony