Author: agkaiser | Posted on: 11/12/2009 4:48:01 AM | Views : 342

ERROR :The remote server returned an error: (550) File unavailable (e.g., file not found, no access).
hi friends iam new to vb.net
pls tell me any mistake in this code giovn below
while i run this code. it display error as
(The remote server returned an error: (550) File unavailable (e.g., file not found, no access).)
 pls correct this code
thanks
Dim reqObj As FtpWebRequest = WebRequest.Create("ftp://abc.com/foldername/ftp.xls")
reqObj.Method = WebRequestMethods.Ftp.UploadFile
reqObj.Credentials = New NetworkCredential("username", "password")
Dim streamObj As FileStream = File.OpenRead("d:\port_emp.xls")
Dim buffer(streamObj.Length) As Byte
streamObj.Read(buffer, 0, buffer.Length)
streamObj.Close()
streamObj = Nothing
reqObj.Proxy = Nothing
reqObj.GetRequestStream().Write(buffer, 0, buffer.Length)
reqObj = No ...

Go to the complete details ...