Saturday, June 1, 2013

Delete File Form FTP Server ASP.NET

       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();
        

No comments:

Post a Comment

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...