Test FTP upload file today, the same code from its own demo moved to the formal code, unable to implement the function, and reported
Stream rs = Ftp.getrequeststream () indicates that the remote server returned an error: (550) The file is not available (for example, the file was not found,
Baidu Search Reason:
1. say file permissions;
2. The path is correct;
3. Path is not to add "@"
There are other kinds of statements, one-by-one check not found errors, the key is the same file code, a program can correctly complete the upload, a jump exception.
It suddenly occurred to me that the FTP class hints using System.Linq when copying the code, and namespace errors.
So from then on, using System.Linq; is 3.5 after some, non-demo program is from 2.0 turn over, in the attribute inside into 4.0, referring to using System.Linq;
Everything's fine.
FTP upload file prompt 550 error cause analysis.