I have a PCL, WP and WinStore projects. In the PCL project I have a class with this method:
private async Task<string> GetIpAddress()
{
const string url = "http://www.ip-adress.com/";
const string buscar = "<h3>Your IP address is:";
var client = new HttpClient();
var data = await client.GetStringAsync(url);
if (data.IndexOf(buscar, StringComparison.Ordinal) <= -1) return;
var IpAddress = data.Remove(0, data.IndexOf(buscar, StringComparison.Ordinal) + buscar.Length + 1);
IpAddress = IpAddress.Remove(IpAddress.IndexOf("</h3>", StringComparison.Ordinal));
return IpAddress;
}
When I invoke the method on the Windows Phone project works perfectly, but not in the Windows Store project. Instead, I'm getting this error message: