I\'m trying to use the async HttpWebRequest in Silverlight for Windows Phone. All works perfect until I get to the where I should call
private stati
You probably want to move allDone.Set() outside the try..catch. Otherwise the event will never be set if there's an exception and the thread that started the async operation will hang. That is, you want to write:
try
{
request = (HttpWebRequest)asynchronousResult.AsyncState;
response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
}
catch (Exception e)
{
Debug.WriteLine("Got Exception in GetResponseCallback: " + e.Message);
}
allDone.Set();