ASP.NET MVC - Use Reflection to find if a Controller Exists

前端 未结 3 804
离开以前
离开以前 2021-02-10 04:23

I\'m having a heck of a time figuring out how to properly implement my 404 redirecting.

If I use the following

 _
Public Class BaseC         


        
3条回答
  •  [愿得一人]
    2021-02-10 04:46

    Why don't you just capture them with custom errors in your web.config file and avoid a bunch of reflection all together?

       
        
    
    

提交回复
热议问题