string fullpath = "ftp server path" + lblName.Text;
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(new Uri(fullpath));
request.Method = WebRequestMethods.Ftp.DeleteFile;
request.Credentials = new NetworkCredential("user","password ");
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = true;
request.Timeout = 100000;
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
response.Close();
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(new Uri(fullpath));
request.Method = WebRequestMethods.Ftp.DeleteFile;
request.Credentials = new NetworkCredential("user","password ");
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = true;
request.Timeout = 100000;
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
response.Close();
No comments:
Post a Comment