I have an asynchronous method that consumes a Web API action. It appears to be stuck in a loop. My reasoning for this is because if I put a break point on line 1 of the catc
Are you working in a external library? If so try adding ConfigureAwait(false);
var response = await _client.GetAsync(string.Format("{0}/api/document", _baseURI))
.ConfigureAwait(false);
Its to do with telling await not to capture the current context. Calling ConfigureAwait will ensure the rest of the method is executed using the ThreadPool. Some good reading on the subject can be found here on Stephen Cleary's blog.