Asp.net的WebAPI HTTP服务器错误 - 用户断开连接 [英] Asp.net WebAPI HTTP SERVER ERRORS - user breaks the connection

查看:851
本文介绍了Asp.net的WebAPI HTTP服务器错误 - 用户断开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web.Api项目,我把它部署到Azure网站。
有些时候,我看到很多的 HTTP服务器错误在仪表盘上。

I have a Web.Api project, and I deployed it to Azure Web Sites. Some times I see many HTTP SERVER ERRORS in dashboard.

详细的错误信息:模块ManagedPipelineHandler
  通知ExecuteRequestHandler
  处理器System.Web.Http.WebHost.HttpControllerHandler错误
  code 0x800703e3请求
  网址的http://测试服务器:80 / API /统计/ ShowStories 物理
  路径D:\\家\\网站\\ wwwroot的\\ API \\统计\\ ShowStories登录
  方法匿名登录用户匿名

Detailed Error Information: Module ManagedPipelineHandler Notification ExecuteRequestHandler Handler System.Web.Http.WebHost.HttpControllerHandler Error Code 0x800703e3 Requested URL http://test-server:80/api/Statistics/ShowStories Physical Path D:\home\site\wwwroot\api\Statistics\ShowStories Logon Method Anonymous Logon User Anonymous

我不知道如何解决它,为什么它会发生。

I don't know how to fix it and why it happens.

更新

我发现这会发生什么,因为用户打破了互联网连接,而我的下一个问题:如何抓住这个问题,也许创造了一些自定义异常处理程序,并且记录器这样的问题,这是什么HTTP服务器错误,而不是展示给Azure的仪表板?

I found what this happens because user breaks the internet connections, and my question in next: how to catch this problems, maybe create some custom exception handler, and logger this problems, what this 'http server errors' and not show to Azure dashboard?

推荐答案

请参阅这个问题:<一href=\"http://stackoverflow.com/questions/22157596/asp-net-web-api-operationcanceledexception-when-browser-cancels-the-request\">ASP.NET网页API OperationCanceledException当浏览器取消申请

我认为,如果你正确地处理OperationCanceledException,错误将不会被记录。

I think that if you handle OperationCanceledException correctly, the error will not be logged.

这篇关于Asp.net的WebAPI HTTP服务器错误 - 用户断开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆