I predict that you are calling Task<T>.Result
or Task.Wait
further up your call stack, which will cause a deadlock (as I explain on my blog).
By default, await
will capture the "current context" (in this case, likely a UI context), and will use that context to resume the execution of the async
method. If you block the UI thread by calling Result
or Wait
on that task, then the async
method cannot complete because it's trying to complete on the blocked UI thread.