471,354 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

WebClient.DownloadFile Performance problem

I have been suddenly having a performance problem downloading images
from one server (productive) to another (productive) using the
following code ..

WebClient webClient = new WebClient();
try
{
webClient.DownloadFile(sourceUrlFilename, destinationFilename);
}
catch (Exception ex)
{
}

For each image that I try to download I have now a 3-6 second delay.
Before a few days this process ran without any delay. (Before the 18th
October 2005 it was fast and then since 18th October 2005 not)
On my development machine, which is behind a firewall / proxy server, I
get the following exception
System.Net.WebException
"The underlying connection was closed: Unable to connect to the remote
server."
Stack:
at System.Net.HttpWebRequest.CheckFinalStatus()\r\n at
System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult)\r\n
at System.Net.HttpWebRequest.GetResponse()\r\n at
System.Net.WebClient.DownloadFile(String address, String fileName)\r\n
at Swisscom.IT.Immo.BOL.Image.CopyImageFile(String sourceUrlFilename,
String destinationFilename) in
z:\\webfolder\\app\\web\\bol\\image.cs:line 300

thanks for any help

Nov 19 '05 #1
1 2741
pe************@swisscom.com wrote:
I have been suddenly having a performance problem downloading images
from one server (productive) to another (productive) using the
following code ..

WebClient webClient = new WebClient();
try
{
webClient.DownloadFile(sourceUrlFilename, destinationFilename);
}
catch (Exception ex)
{
}

For each image that I try to download I have now a 3-6 second delay.
Before a few days this process ran without any delay. (Before the 18th
October 2005 it was fast and then since 18th October 2005 not)


Did the remote host change in any way? I don't think you can blame
WebClient for this one ;-)

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by pascal_dumont | last post: by
1 post views Thread by Cheri Elkin | last post: by
8 posts views Thread by DEWright_CA | last post: by
1 post views Thread by vin.dor | last post: by
8 posts views Thread by =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.