FTPWebRequest 530 Error: Not Logged in issue

你说的曾经没有我的故事 提交于 2019-12-02 16:21:26

问题


I have been digging through a mountain of posts on how to properly login to FTP in C# but when I actually try, it does not work. Through my readings I have come to think that it is because my username has the 'at' symbol in it. Is this true or is does it appear that there is something else wrong? I am able to login using FileZilla no problem.

var file = f.Element("FILE_PATH").Value;
string ftpHost = "myFTP.com";

var URI = @"ftp://" + ftpHost + "/download/" + file; 
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(URI);
ftp.Credentials = new NetworkCredential(@"me@mysite.com", "Password");
ftp.UseBinary = true;
ftp.Method = WebRequestMethods.Ftp.DownloadFile;

FtpWebResponse ftpResponse = (FtpWebResponse)ftp.GetResponse();

来源:https://stackoverflow.com/questions/14968938/ftpwebrequest-530-error-not-logged-in-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!