I use WebRequest.BeginGetResponse in order to retrieve a resource asynchronously.
Is it possible using this async way to be notified if a timeout occurred for the specified resource ?
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);
var asyncResult = req.BeginGetResponse(new AsyncCallback(RespCallback), req);
HttpWebRequesthas aTimeoutproperty.Using
BeginGetResponseon timeout the returnedIAsyncResultwill be signalled as completed or the callback passed toBeginGetResponsewill be called. When you then callEndGetResponsethe exception indicating the timeout will be thrown.