ASP.NET MVC4 CustomErrors DefaultRedirect Ignored

后端 未结 6 1923
悲&欢浪女
悲&欢浪女 2021-02-04 07:50

I have an MVC 4 app, using a custom HandleErrorAttribute to handle only custom exceptions. I would like to intercept the default 404 and other non-500 error pages and replace t

6条回答
  •  故里飘歌
    2021-02-04 08:23

    I am not sure this answer will help you but this a simple way... I placed error.html in / and turned mode to on for custom errors in web config and this works perfectly...

      
        
      
    

    this error.html is a basic html page with head and body..

提交回复
热议问题