Newtonsoft.Json error

marti99marti99 Member ✭✭

hi guys, i'm trying my app in my phone but if i try the app with Wi-Fi the app work well, if i try the app with my mobile internet connection it don't work.
Here is my code:
var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(20) };
HttpResponseMessage response = await client.GetAsync("http://unthreaded-storm.000webhostapp.com/Connession.php?Query=Select Username, aes_decrypt(Password,'LpOkzQA8IapOc4GJk2CHjM9wjIM') as Password From User");
var result = await response.Content.ReadAsStringAsync();
var dataSet = JsonConvert.DeserializeObject(result);
int u = 0;
int p = 0;
foreach (var datatable in dataSet.posts)
{
//My code
}

Thanks to all for the help

Tagged:

Answers

  • ArindamSarkarArindamSarkar Member ✭✭

    Could be your site not IPv6 compliant and mobile network hence throw error.

  • marti99marti99 Member ✭✭
    edited August 2018
    I've found 1 hours ago the problem. The problem was that i have a mobile offert that block the http link so i only need to add the tls or to disable this option
    Thank you for the answer
Sign In or Register to comment.