TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mai Hu Na
NA
86
133.9k
Load large files using ftp in c# code
Mar 6 2013 9:22 AM
hi all,
i am working on loading large files of size 200 mb or more sizes to one server to another but it gives Error
"The remote server returned an error: (550) File unavailable (e.g., file not found, no access)."
please help me my function to load files is
FTPUpload(string FilePath, string FTPServer, string Username, string Password)
(
//Reading file into a byte array
byte[] file = null;
file = System.IO.File.ReadAllBytes(p_FilePath);
//Request
System.Net.FtpWebRequest req = null;
req = (System.Net.FtpWebRequest)System.Net.WebRequest.Create(p_FTPServer);
//Credentials
System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(p_Username, p_Password);
req.Credentials = credentials;
//Request Method
req.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
//uploading file onto FTP server
System.IO.Stream stream = null;
stream = req.GetRequestStream();
stream.Write(file, 0, file.Length);
stream.Close();
)
please help..Thanks
Reply
Answers (
3
)
checkbox change event in datagridview using c shsarp
Observable list show null value