I was facing the same issue that my callback was not being called even after waiting too long.
I found this stackoverflow answer https://stackoverflow.com/a/15041383 and modified my code accordingly. The actual problem in that question was that asker wants to have some timeout functionality in the HttpWebRequest under Windows Phone 8. Having timer was irrelevant for me, so I just took the following part of code:
public async Task<string> httpRequest(HttpWebRequest request)
{
string received;
using (var response = (HttpWebResponse)(await Task<WebResponse>.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null)))
{
using (var responseStream = response.GetResponseStream())
{
using (var sr = new StreamReader(responseStream))
{
received = await sr.ReadToEndAsync();
}
}
}
return received;
}
and modified my call to this method as:
var response = await httpRequest(request);
This is now working fine for me.
I also double checked that ID_CAP_NETWORKING is check in WMAppManifest.xml and internet is working on my emulator.