I am trying to implement the HttpWebRequest timeout for my WP7 application, as the user can make a request and the request will never return, leaving a ProgressBar on the screen.
I saw this MSDN page: msdn page
What uses
ThreadPool.RegisterWaitForSingleObject (result.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), myHttpWebRequest, DefaultTimeout, true);
I managed to add this code and bind all the variables, but when I add it to my code, it gives NotSupportedOperationwhen going to the line:
allDone.WaitOne();
If I comment on this, it gives the same NotSupportedOperationon my next line,
return _result_object;(function private object SendBeginRequest())
How to add timeout in WP7? This method does not seem to work. I would prefer not to use WebClient because of a problem with the UI thread.