I call the REST service in Windows Phone 8.1, it works in the simulator, but it does not work on the device. I'm stuck here, how to deal with it? See my code below:
System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:32002/XXXXX.svc/live_login?uname=abc&pwd=123");
HttpResponseMessage response = await client.SendAsync(request);
string data = await response.Content.ReadAsStringAsync();
var dialog = new MessageDialog(data);
await dialog.ShowAsync();
source
share