I'm checking a URL and start a new task to prevent UI freezing.
Like this:
HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
request.Method = "HEAD";
var response = (HttpWebResponse)await Task.Factory.FromAsync<WebResponse>(request.BeginGetResponse,request.EndGetResponse,null);
The point is.. I'm implemented a max time (for example 10 seconds). If the app reach 10 seconds without response, the task must be aborted.