Custom error page for Http error 404.13 ASP.NET Core MVC

后端 未结 2 1289
广开言路
广开言路 2021-01-05 07:42

I am fairly new to ASP.NET and MVC in general; I have been migrating an ASP.NET MVC app to ASP.NET MVC Core. In the former framework I was able to handle an HttpException fo

2条回答
  •  误落风尘
    2021-01-05 08:22

    You are correct. IIS is nabbing the error before it gets into your pipeline. I would recommend adding the httpErrors module into your web.config and pointing it at a page on the site.

    
      
        
        
      
    
    

提交回复
热议问题