Here's a small peace of c# code that uploads to ftp from the link source below. You could use it to simply write to using the stream object. Hopefully the connection won't be disconnected before your done uploading. You could give it a try.
public void ftpfile(string ftpfilepath, string inputfilepath)
{
string ftphost = "127.0.0.1";
string ftpfullpath = "ftp://" + ftphost + ftpfilepath;
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpfullpath);
ftp.Credentials = new NetworkCredential("userid", "password");
ftp.KeepAlive = true;
ftp.UseBinary = true;
ftp.Method = WebRequestMethods.Ftp.UploadFile;
FileStream fs = File.OpenRead(inputfilepath);
byte[] buffer = new byte[fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();
Stream ftpstream = ftp.GetRequestStream();
ftpstream.Write(buffer, 0, buffer.Length);
ftpstream.Close();
}
http://www.logiclabz.com/c/ftp-file-upload-using-ftpwebrequest-in-net-c.aspx[
^]
Good luck!