Ticket #248 (closed question: fixed)
Global exception logged after 404Handler redirects
Reported by: | magne.ingvaldsen@… | Owned by: | mari@… |
---|---|---|---|
Priority: | minor | Component: | 404Handler |
Keywords: | Cc: |
Description
When the Custom404Handler performs the redirect, we get two events in our error log; "Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET". I tried to catch the error in Application_Error in Global.asax, but GetLastError returns nothing. That might be because the error is cleared from the httpcontext in the 404Handler(?). This could be related only to our environment, or is this a know issue? This is not a big problem, but it creates a lot of noise in our error logs.
Change History
comment:2 Changed 11 years ago by mari@…
Fixed in changeset [2052] - using solution specified above. New and updated module package available on the module download page
Note: See HelpUser/Tickets
for help on using tickets.
A possible fix for this would be to set the HttpCurrent.Context to null at the bottom at the PerformRedirect method (in Custom404Handler.cs), which would cause the Global_Error to exit before the logging occurs.