Click here to Skip to main content
14,664,496 members
Rate this:
Please Sign up or sign in to vote.
See more:
I wrote following code below:
Try
Dim createFTP As String = Convert.ToString(host & Convert.ToString("/")) & remoteFile
' Create an FTP Request 
ftpRequest = DirectCast(FtpWebRequest.Create(createFTP), FtpWebRequest)

' Log in to the FTP Server with the User Name and Password Provided 
ftpRequest.Credentials = New NetworkCredential(user, pass)
'ftpRequest.Credentials = New NetworkCredential(user, pass, createFTP)

' When in doubt, use these options 
ftpRequest.UseBinary = True
ftpRequest.UsePassive = True
ftpRequest.KeepAlive = True

' Specify the Type of FTP Request 
ftpRequest.Method = WebRequestMethods.Ftp.UploadFile

' Establish Return Communication with the FTP Server 
ftpRequest.Timeout = 600000
ftpRequest.ReadWriteTimeout = 600000

' read in file...
Dim bFile() As Byte = System.IO.File.ReadAllBytes(localFile)

'  ftpStream = ftpRequest.GetRequestStream()
' Open a File Stream to Read the File for Upload 
Dim clsStream As System.IO.Stream = ftpRequest.GetRequestStream()
clsStream.Write(bFile, 0, bFile.Length)
clsStream.Close()
clsStream.Dispose()

ftpRequest = Nothing
Catch ex As WebException
  MsgBox(ex.ToString())
End Try


But not working properly & generate the error no 553 in ftp server.
How can i solve it..
Please help me .

Thanks in advance.
Posted
Updated 16-Feb-15 2:17am
v3
Comments
ZurdoDev 16-Feb-15 8:15am
   
I believe 553 is a permission denied error.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

FTP error 553 is about permission. So if you got that error it means that the supplied credentials are not valid to access the FTP. You should check your FTP for proper user credentials, fix that issue and than check your code...
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100