在Asp.net Web API中捕获404错误 [英] Catch 404 errors in Asp.net Web API

查看:133
本文介绍了在Asp.net Web API中捕获404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图捕获Asp.net Web API服务器返回的404错误。

I am trying to catch 404 errors which are returned by the Asp.net Web API server.

但是, Application_Error

However, Application_Error from inside Global.asax is not catching them.

有没有办法处理这些错误?

Is there a way to handle these errors?

推荐答案

您可能需要查看在ASP.NET Web API中处理HTTP 404错误具有一步一步的示例

You might want to take a look at Handling HTTP 404 Error in ASP.NET Web API which has a step by step example

这篇关于在Asp.net Web API中捕获404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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