WebClient.DownloadFile Performance problem

P

peter.rietmann

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(IAsyncResult 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
 
J

Joerg Jooss

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top