Edit: This question looks like it might be the same problem, but has no responses...
Edit: In test case 5 the task appears to be st
Since you are using .Result
or .Wait
or await
this will end up causing a deadlock in your code.
you can use ConfigureAwait(false)
in async
methods for preventing deadlock
like this:
var result = await httpClient.GetAsync("http://stackoverflow.com", HttpCompletionOption.ResponseHeadersRead)
.ConfigureAwait(false);
you can use
ConfigureAwait(false)
wherever possible for Don't Block Async Code .