Piotrekk,
You can derive a class from the WebClient class and provide a public
method/property which will call the protected GetWebRequest method and then
set the Timeout property on that.
Or, you could just use the HttpWebRequest/HttpWebResponse (assuming you
are using HTTP, you can do it for any class that derives from WebRequest)
and set the Timeout property.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Piotrekk" <Pi*************@gmail.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
Hi
My question is:
What is the best way to download file giving it maximum timeout ( for
example 30 minutes ). After this time the operation should be
terminated ( maybe exception ? ). I was thinking about simplest
possible solution WebClient class but don't know if it is possible to
implement timeout...
Regards
Piotr Kolodziej