.net - EndRequest not fired on IIS when resource is missing -


I have an HTTP module that hooks up on the IIS6 registered andrew event with a wired handler and it works properly The request ends on an .aspx page, but if the URL does not disappear (404).

I think the request ends due to staticfilehandler, but is there a good solution to this problem?

I have tried the same solution in IIS7 (pipeline mode) and it works fine there.

First of all, I will try, that IIS should not tell to verify the file, which Will allow the request to pass through the HTT module. If you can do this for a particular file mapping, including wildcard.

If there is no alternative above, then in a worse situation you can add a default handler to web 40. Error 404 in web.config, so that if the HTTPS module can not catch this event, then you have There is still a chance to 'do something' on the basis of what you are trying to accomplish in the event of Andrew's event, you may still be able to use the workaround.

  & lt; CustomErrors defaultRedirect = "ErrorPage.aspx" mode = "on" & gt; & Lt; Error status code = "404" redirect = "filenotfound.aspx" /> & Lt; / CustomErrors & gt;  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -