How can I properly handle 404 in ASP.NET MVC?

后端 未结 19 2772
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-21 10:14

I am using RC2

Using URL Routing:

routes.MapRoute(
    \"Error\",
     \"{*url}\",
     new { controller = \"Errors\", action = \"N         


        
19条回答
  •  [愿得一人]
    2020-11-21 10:28

    I have gone through all articles but nothing works for me: My requirement user type anything in your url custom 404 page should show.I thought it is very straight forward.But you should understand handling of 404 properly:

     
        
          
        
      
    
        
          
          
        
    
    

    I found this article very helpfull.should be read at once.Custome error page-Ben Foster

提交回复
热议问题