Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to Programmatically C# Change/Reset  FTP Password 


What I have tried:

FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://" + hostid);
               request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
               request.Credentials = new NetworkCredential(rackid, password);
               request.GetResponse();
               request.KeepAlive = true;
               request.UseBinary = true;
               request.UsePassive = true;
               request.GetResponse();
Posted
Updated 10-Oct-20 4:22am
Comments
Richard MacCutchan 10-Oct-20 8:16am    
It will depend on the FTP server. Do it manually to see what the request/response sequence is.

1 solution

AFAIK, you cannot as such. FTP is a protocol which a server implements. It depends on the server application if any such capability is provided with it. If you are using a third party FTP, check with the vendor of FTP server if and how this can be done.

An approach for it could be to automate a remote login to this box and execute a script which does this change.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900