ftp服务器中出现553错误 [英] 553 error in ftp server

查看:183
本文介绍了ftp服务器中出现553错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在下面写了以下代码:

尝试

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





但是没有正常工作&在ftp服务器中生成错误号553.

如何解决它..

请帮助我。



提前谢谢。



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

Thanks in advance.

推荐答案

FTP错误553是关于权限的。因此,如果您收到该错误,则表示提供的凭据无法访问FTP。您应检查您的FTP以获取正确的用户凭据,修复该问题并检查您的代码...
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...


这篇关于ftp服务器中出现553错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆