문제

I am trying to moving a file from one folder to another using FtpWebRequest but i keep getting error 550. This is my code;

var requestMove = (FtpWebRequest)WebRequest.Create(Helper.PathFtp + Helper.NewFolder + file);
requestMove.Method = WebRequestMethods.Ftp.Rename;
requestMove.Credentials = networkCredential;
requestMove.RenameTo = "../" + Helper.OldFolder + file;
requestMove.GetResponse();

I can list, upload, download and delete files but moving/renaming is hopeless. I have read several posts both on stackoverflow and other sites and have tried things like setting Proxy to null and adding special characters to paths but I cant find a solution that works.

The path I use in WebRequest.Create is correct as I can delete it so it must be the RenameTo I got an issue with. Any ideas?

도움이 되었습니까?

해결책

Error 550 means access denied. If the ftp user has sufficient rights, a program (e.g. antivirus, windows thumbnail generator etc) could have the file opened and deny your move request.

You need to contact the server administrator to get around the problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top