I'd recommend you to use the application_error approach. This way you can log the 404'd request data, in a way that you can generate future reports. AFAIK, if you redirect the request using web.config settings, you lose this info.
which one is better: CustomErrors in web.config or application_error?
-
29-05-2022 - |
문제
I'm trapping 404 errors in my MVC website. I have the option to either do that via adding the customerrors element in web.config or application_error, but I don't know which one is better. What is the difference between the two?
해결책
제휴하지 않습니다 StackOverflow