I'm trying to do something that seems like it should be so simple, but has been causing me headaches for days now.
I am making an HTTP request using the HttpWebRequest.BeginGetResponse function. I want it to timeout if it hasn't had a response within 30 seconds. How can I achieve this?
The HttpWebRequest object has no timeout properties. I've tried starting another thread and getting it to abort the request, but I get a cross-thread access error. How else can I achieve this?
Thanks!