我的守则是: -

var httpResponseMessage = await client.PostAsync(pathUrl +"/auth/Login", 
                                  new StringContent(postData,Encoding.UTF8,"application/json"));

抛出异常:

mscorlib.dll中的'System.Net.Http.HttpRequestException'

堆栈跟踪:

位于System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()的System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)的System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)

从Visual-Studio-2012升级到Visual-Studio-2015后,此异常即将开始 .