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

  • Home
  • SEARCH
  • 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 3797004
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:19:58+00:00 2026-05-19T13:19:58+00:00

I have written a very simple console application which is just downloading a file

  • 0

I have written a very simple console application which is just downloading a file using the following piece of code:

System.Net.WebClient web = new System.Net.WebClient ();
web.DownloadFile ("http://www.google.com", "file.txt");

On my previous development machine, this was very fast. As soon as I executed the DownloadFile method, the request went over the wire and the response came back very soon. I inspected this behaviour with the ProcMon tool.

However, after switching to another machine, which happens to be much more powerful than my initial development box, I noticed that nothing would happen for about 5-8 seconds, when calling into DownloadFile. Going to the same URL with a browser would show almost immediate results.

After spending several hours looking into this, stepping into the .NET source code, I finally gave up in System.Net.ServicePointManager.FindServicePoint where the stepping somehow no longer made sense to me, and where some proxy resolution seemed to be in cause.

I finally turned off Automatically detect settings in the LAN Settings dialog of the the Internet Options dialog, found in Internet Explorer 8 (I am running Windows 7 x64), leaving the dialog with no checkbox set. This magically made everything do very, very fast. No more delay.

Well, I’ve found a way to circumvent the problem I was observing, but I’d be glad if somebody could share some ideas as to what might be wrong with my code. Can I somehow achieve the same effect by somehow configuring the WebClient instance?

  • 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-19T13:19:59+00:00Added an answer on May 19, 2026 at 1:19 pm

    Have you tried explicitly setting the proxy?

    web.Proxy = new WebProxy();
    

    That should basically be equivalent to saying, “Don’t use a proxy at all – don’t even try.”

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

Sidebar

Related Questions

I have written a VERY simple MVC application which just displays a single string
Background I have written very simple BBCode parser using C# which transforms BBCode to
I have written a very simple WCF service, that worked fine (code below), then
I have a written a very simple UDP Server using Netty - it quite
I have written a very simple Java application. Can anyone tell me how to
Very simple question I am sure. I have a file called ACLReader.vbs which I
I've written a very simple python numpy code. It have a strange behavior... from
I have a very simple client server code written java(server listens on some port
I'm using Console.WriteLine() from a very simple WPF test application, but when I execute
I've written this very simple function to replace a file extension using LINQ in

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.