Custom Error Handling in web.config / Global.asax not handling non-existant directory

后端 未结 4 895
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 12:09

Question is: Why is custom Error handling not working for non-existing paths/directories?

Updated with fixed code (thanks to everyone for you input):

4条回答
  •  难免孤独
    2020-12-30 12:21

    ASP.NET is never being invoked by IIS. IIS handles the page request, sees that the page doesn't exist, and ASP.NET never gets loaded.

    If you want ASP.NET to get loaded regardless of whether the file exists, you need to change your IIS configuration. Are you using IIS6 or IIS7/7.5?

提交回复
热议问题