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

Complete Authentication System in ASP.NET Core using JWT

JWT (JSON Web Token) authentication is widely used for securing APIs in modern applications. In this article, we will build a complete authe...