Asp.net web api 带Elmah的Web API 2-如何记录操作之外的异常?
我正在将Web API 2与Elmah一起使用,我希望Elmah能够捕获在控制器中的操作之外发生的异常 例如:Asp.net web api 带Elmah的Web API 2-如何记录操作之外的异常?,asp.net-web-api,exception-handling,asp.net-web-api2,elmah,Asp.net Web Api,Exception Handling,Asp.net Web Api2,Elmah,我正在将Web API 2与Elmah一起使用,我希望Elmah能够捕获在控制器中的操作之外发生的异常 例如: protected void Application_Start() { //Exception is thrown here. I want Elmah to catch it. } 在Startup.Auth.cs中: public void ConfigureAuth(IAppBuilder app) { //Exception is thrown here.
protected void Application_Start()
{
//Exception is thrown here. I want Elmah to catch it.
}
在Startup.Auth.cs中:
public void ConfigureAuth(IAppBuilder app)
{
//Exception is thrown here. I want Elmah to catch it.
}
- Elmah版本是1.2.2
- 我正在使用