Hi,
I'm uploading files to the FTP server in .net 3.5 using FTPwebrequest class.
My Code works fine when i try to upload the files through web application.
Pls find the code below:
Now, I have created a windows application and when i try to upload 2 files it is working fine. But when i try to upload more than 2 files, I am getting "Operation has timed out" error message.
Ne suggestions?
I'm uploading files to the FTP server in .net 3.5 using FTPwebrequest class.
My Code works fine when i try to upload the files through web application.
Pls find the code below:
VB.NET:
Dim ftp As Net.FtpWebRequest = FtpWebRequest.Create(Uri)
ftp.Method = Net.WebRequestMethods.Ftp.UploadFile
ftp.UseBinary = False
ftp.ContentLength = fi.Length
Dim streamobj As FileStream = File.OpenRead(fi.FullName)
Dim buffer(streamobj.Length) As Byte
streamobj.Read(buffer, 0, buffer.Length)
streamobj.Close()
streamobj = Nothing
ftp.GetRequestStream.Write(buffer, 0, buffer.Length)
Ne suggestions?
Last edited by a moderator: