ApplicationProgramIn the event of an exception, a friendly handling method is provided, and exceptions are recorded and the system administrator or O & M personnel are notified as common scenarios for application development. On the web form, Microsoft provides a toolkit. For details about this toolkit, refer to the recommended toolkit for custom HTTP 404 errors. How can this function be implemented on ASP.net MVC? When creating a project, Asp.net MVC has an error. aspx view under the shared directory of views. This default error processing function does not implement error logs.
Capture all server exceptions, including httpexeptions, for example, 404 errors, and customize the view of error handling. At the same time, record the errors to the database and send them to relevant personnel. The following two blogs are integrated:
Real world error hadnling in ASP. net mvc RC2: http://blogs.microsoft.co.il/blogs/shay/archive/2009/03/06/real-world-error-hadnling-in-asp-net-mvc-rc2.aspx
Elmah with ASP. net mvc: http://darrell.mozingo.net/2009/02/19/elmah-with-aspnet-mvc/
Convert the twoArticleTo obtain a comprehensive solution for exception handling in Asp.net MVC.
Http://www.dotblogs.com.tw/ricochen/archive/2010/03/10/13960.aspx
Http://msdn.microsoft.com/zh-cn/magazine/cc500592.aspx