tags:

views:

108

answers:

1

I 'm developing FTP exe ASP.NET、C#2.0 .

but I FTP server returned 500 error

FtpWebRequest myReq; 
FtpWebResponse myRes; 

myReq = (FtpWebRequest)WebRequest.Create("ftp://test/aaa.txt"); 
myReq.Credentials = new NetworkCredential("xxxx", "xxxx"); 

myReq.Method = WebRequestMethods.Ftp.DownloadFile; 
myRes = (FtpWebResponse)myReq.GetResponse(); // here error occured

What's wrong?

A: 

From what you have posted all I can say is that "something went wrong with the FTP request" - there are loads of reasons why - the ftp address might not be not being correct or your user credentials might be incorrect, or something completely different might have gone wrong.

EDIT: Misunderstood the question...

Kragen
Thanks a lot!!!!I don't use credentials.And FTP server log The FTP server log cannot look in authorityThis command execute everyday.but this error is over twice every day on the month.In addition, can it be thought?
ffffff