ASP.NET MVC - Catch All Route And Default Route

后端 未结 8 1973
伪装坚强ぢ
伪装坚强ぢ 2020-11-28 04:15

In trying to get my application to produce 404 errors correctly, I have implemented a catch all route at the end of my route table, as shown below:

 routes.M         


        
8条回答
  •  生来不讨喜
    2020-11-28 04:58

    You are probably better off configuring the 404 error document in the section of the configuration then restoring the default route.

    FWIW, I think the default route requirement is retarded too.

提交回复
热议问题