vegoreddy
asked on
Set timeout for webClient.DownloadFile()
I am trying to download a .pdf file from an URL and their webserver is very, very slow which is causing a timeout in my WebClient object.
Here is my code:
WebClient webClient = new WebClient();
webClient.DownloadFile(dow nloadUrl, downloadFile);
Is there a way to set an definite timeout on this object?
Or if not can anyone help me with an example on an alternate way to do this?
The URL works fine in a browser - it just takes about 3 minutes to show.
example with step by step will be appriciated.
Thanks,
Vego
Here is my code:
WebClient webClient = new WebClient();
webClient.DownloadFile(dow
Is there a way to set an definite timeout on this object?
Or if not can anyone help me with an example on an alternate way to do this?
The URL works fine in a browser - it just takes about 3 minutes to show.
example with step by step will be appriciated.
Thanks,
Vego
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.