string url = \"http://google.com/index.html\";
WebClient client = new WebClient();
Stopwatch sw = new Stopwatch();
sw.Start();
string text = client.DownloadString(ur
There may be a couple of things that would cause a delay on the first call such as detecting proxy settings. Try setting the proxy to null:
client.Proxy = null;
Your machine is configured to perform Automatic Proxy Detection.
You can disable it here:
Alternatively, you can manually override the proxy to be used by the WebClient; null
means no proxy:
client.Proxy = null;
However, you should offer the user to configure a proxy in your application in this case, because some users have to use a proxy when accessing the Web.