Logging errors in ASP.NET MVC

前端 未结 6 1344
温柔的废话
温柔的废话 2020-12-07 06:55

I\'m currently using log4net in my ASP.NET MVC application to log exceptions. The way I\'m doing this is by having all my controllers inherit from a BaseController class.

6条回答
  •  孤城傲影
    2020-12-07 07:29

    Have you thought about extending the HandleError attribute? Also, Scott has a good blog post about filter interceptors on controllers/ actions here.

提交回复
热议问题