Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

NameResolutionFailure using HttpClient

$
0
0

I have an app where I use HttpClient to communicate to a web service. But before I do any HttpClient requests, I am opening up a WebView, which I use to grab a SimpleWebToken from Azure ACS. That works fine, however if I immediately after closing the WebView initiate a http request of some sort, I get a System.Net.WebException: NameResolutionFailure. However, if I either set a break point and wait for a second or two or add a Thread.Sleep() and GC.Collect() before this, the exception never occurs. This makes me think of bug #15135, is this really what I have to do in order to avoid these exceptions? It kind of freezes my application at every http request, which isn't really nice.

Are there any other workarounds for this issue?


Viewing all articles
Browse latest Browse all 204402

Trending Articles