错误详情:已取消该操作。--------- 在 System.Threading.CancellationToken.ThrowOperationCanceledException()
在 System.Net.Http.HttpContentExtensions.<ReadAsAsyncCore>d__0`1.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Web.Http.ModelBinding.FormatterParameterBinding.<ExecuteBindingAsyncCore>d__0.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Web.Http.Controllers.HttpActionBinding.<ExecuteBindingAsyncCore>d__0.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()

  

尝试如下操作:
config.MessageHandlers.Add(new CancelledTaskBugWorkaroundMessageHandler());

class CancelledTaskBugWorkaroundMessageHandler : DelegatingHandler
{
protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
HttpResponseMessage response = await base.SendAsync(request, cancellationToken);

    // Try to suppress response content when the cancellation token has fired; ASP.NET will log to the Application event log if there's content in this case.
if (cancellationToken.IsCancellationRequested)
{
return new HttpResponseMessage(HttpStatusCode.InternalServerError);
} return response;
}

}

最新文章

  1. HBase Zookeeper 安装学习
  2. Shell数组相关操作
  3. a byte of python (摘01)
  4. java虚拟机内部介绍
  5. TortoiseSVN的bin目录下面没有svn.exe
  6. sort()和qsort()方法详解
  7. 了解CentOS及周边
  8. centos使用fuse挂载NTFS
  9. 四轴飞行器1.2.2 RT-Thread 串口
  10. jQuery基础教程第四版练习答案
  11. iOS开发学习路径的一些建议
  12. 谈谈一些有趣的CSS题目(十五)-- 奇妙的 background-clip: text
  13. Codeforces Round #411 (Div. 2)(A,B,C,D 四水题)
  14. 教你如何解决Sublime Text 3使用中出现的中文乱码问题
  15. java 读取文件乱码
  16. Ubuntu释放磁盘空间的几种常用方法
  17. 前端之html表单
  18. python json dumps与loads有可能犯的错误
  19. iOS 9 通用链接(Universal Links)
  20. es 中的 Set 和 Map

热门文章

  1. PHP实现财务审核通过后返现金额到客户
  2. SSH SSL TELNET的比较(转)
  3. varnish加速web
  4. 关于python模块总结
  5. 2019安徽省程序设计竞赛 I.你的名字(序列自动机)
  6. Codeforces 1251E Voting
  7. etcd增删改查
  8. jsp之大文件分段上传、断点续传
  9. oracle的一些状态查询
  10. 【loj2567】【APIO2016】划艇