Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 578625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:16:50+00:00 2026-05-13T14:16:50+00:00

I am using C# to upload some file to a ftp server. If the

  • 0

I am using C# to upload some file to a ftp server. If the file already existed the FtpWebRequest timed out, so I thought to deleate it first.

However the WebRequestMethods.Ftp.DeleteFile also always times out. Am I doing something wrong?

Here is my code:

FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(address);

request.Credentials = new NetworkCredential(Username, Password);
request.KeepAlive = false;
request.Method = WebRequestMethods.Ftp.DeleteFile;

try
{
    FtpWebResponse resp = (FtpWebResponse)request.GetResponse();
}
catch (Exception e)
{
    ...         
}

EDIT: Oh and it doesn’t matter witch file I am trying to delete. As long as the file exists the request will always time out. If the file doesn’t exist a different exception is thrown.

Nothing is wrong with credentials, I can do other operations (upload/download without a problem). Also it’s not a server problem, if I connect to it with a client (FileZilla) with the same username / pass everything works as it should.

Thank you for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:16:51+00:00Added an answer on May 13, 2026 at 2:16 pm

    The thing I have found using this Ftp via FtpWebRequest, is it is inherently a lot slower (since it is using the HTTP protocol over port 80), and it drives me crazy because FileZilla can do it a lot quicker (obviously using FTP protocol over port 20/21). There is a open source ftp component found here, I do not know if it will work for you, but worth a shot.

    I know this is a subjective answer that will get downvoted, but personally, using ftp over port 80 is bound to be a lot slower especially on file operations like what you are trying to achieve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using <input type=file id=fileUpload runat=server> to upload a file in an ASP.NET
When I am using a form containing <input id=myFile type=file runat=server /> to upload
When I upload a file to a site using the ASP:File control the FileName
How would I upload a file to a webserver using c++ and MFC. We
in my python program to upload a file to the internet, im using a
I need to upload images using FileUpload without postback(using Ajax).I tried many examples.But in
I am currently using the following command to upload my site content: scp -r
I'm using the jQuery Form plugin to upload an image. I've assigned a fade
I'm trying to upload documents to SharePoint using web services attaching custom metadata to
How can I upload files to a HTTPS site using CURL? The site is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.