Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a problem while establishing connection through proxy, How to delete a file from ftp using c# , the connection have to be established through proxy?


My coding is as follows,

C#
string fileName = "testFile.txt";

FtpWebRequest requestFileDelete = (FtpWebRequest)WebRequest.Create("ftp://....." + fileName);
requestFileDelete.Credentials = new NetworkCredential("....", "...");
requestFileDelete.Method = WebRequestMethods.Ftp.DeleteFile;

FtpWebResponse responseFileDelete = (FtpWebResponse)requestFileDelete.GetResponse();


But am getting the following Error:

The requested FTP command is not supported when using HTTP proxy.


Please Help me
Posted
Updated 9-Jan-14 2:43am
v2
Comments
Kornfeld Eliyahu Peter 9-Jan-14 9:08am    
Did you got an error?
Member 9817377 11-Jan-14 5:13am    
I am getting the following Error:

The requested FTP command is not supported when using HTTP proxy.

1 solution

 
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