I'm currently working on a Windows Phone 8.1 app, my first one actually. I would like to send through my emulator windows phone 8.1, a http request to a remote server. So I've used that code:
try
{
mailToCheck.MailProfil = TxtBox_mail.Text.ToString();
string js = JsonConvert.SerializeObject(mailToCheck);
HttpClient httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Add("Accept", "Application/JSON");
HttpRequestMessage data = new HttpRequestMessage(HttpMethod.Post, new Uri("url");
data.Content = new HttpStringContent((js));
HttpResponseMessage response = await httpClient.SendRequestAsync(data).AsTask();
string statusCode = response.StatusCode.ToString();
}catch (Exception ex)
{
}
and I'm always getting that error : 0x80072efd. I've heard of it means that there is no internet connexion but I'm able to navigate on website on the emulator web browser. The Networking capability is checked. Does somebody already faced that issue ? Maybe the Hyper-V blocking ? Thanks in advance
After trying all the solutions proposed all over the web, I couldn't figure out how to solve that problem. All the following didn't work at all: - Cleaning of the virtual machines on Hyper-V - Disable/Able Hyper-V - Repair the SDK with visual studio repair tool. - Re-install Visual Studio 2013 update 2. Still not working the Emulator 8.1 WVGA 4 inch - 512 MB. Somehow, I've tried to launch my project on the Emulator 8.1 WVGA 4 inch and it works magically. My trials to solve that problem took a lot of time and came to nothing. So my advise is to use the following emulator: Emulator 8.1 WVGA 4 inch. The difference between these emulators is about the memory allowed for the app, if you use Emulator 8.1 WVGA 4 inch just be careful about performance management for low performance devices as Lumia 520 for example.
User contributions licensed under CC BY-SA 3.0