FtpWebRequest UploadFtp; UploadFtp = (FtpWebRequest)FtpWebRequest.Create(new System.Uri(FileName)); //address of ftp server/file UploadFtp.Method = WebRequestMethods.Ftp.UploadFile; //what we intend to do UploadFtp.UseBinary = false; //text (ascii) file UploadFtp.Credentials = new NetworkCredential(LoginName,Password); //authenticate to ftp server UploadFtp.Proxy = null; StreamReader UpStream = new StreamReader(LocalFileToUpload); //stream to read saved file byte[] UpStreamFileContents = System.Text.Encoding.UTF8.GetBytes(UpStream.ReadToEnd()); //byte array to hold file contents UpStream.Close(); //close the stream UploadFtp.ContentLength = UpStreamFileContents.Length; //tell ftp server to expect this length Stream UpStreamRequest = UploadFtp.GetRequestStream(); //new stream to send to ftp UpStreamRequest.Write(UpStreamFileContents, 0, UpStreamFileContents.Length); //write to ftp UpStreamRequest.Close(); //close the stream FtpWebResponse UpStreamResponse = (FtpWebResponse)UploadFtp.GetResponse(); //get the response from ftp UpStreamResponse.Close(); //close the response stream