本文介绍了如何使用c#从ftp中删除文件,必须通过代理建立连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好, 我在通过代理建立连接时遇到问题,如何使用c#从ftp删除文件,必须通过代理建立连接? 我的编码如下,
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();但是我收到以下错误: 使用HTTP代理时不支持请求的FTP命令。 请帮帮我
解决方案简单的C#FTP类 [ ^
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,
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
解决方案 Simple C# FTP Class[^]更多推荐
如何使用c#从ftp中删除文件,必须通过代理建立连接
发布评论