Application Events AFTER a response.redirect

S

Steve Lutz

I have some global prosessing done on both the PreRequestHandlerExecute and
PostRequestHandlerExecute events in my Global.asax.

These event handlers do some session management things and some processing
to determine if cookies are enabled on the client's browser.
To handle the cookies, the PreRequestHandlerExcecute event creates a cookie
(if it doesn't exist) and then redirects to another page that determines if
the cookie is available. If it isn't, then I know the client doesn't support
cookies.

However, when redirecting, the PostRequestHandler event is never called.

The reason I am using these events is because 1) I want every page (request)
to be handled by this and 2) I need access to the session object.

The following article implies that my PostRequestHandler won't be called
when I do a response.redirect:
http://support.microsoft.com/default.aspx?scid=kb;en-us;312607

I have thought about using an HttpHandler instead, which seems a little more
elegant, but it this going to have the same issue of not having the
PostRequest handler called?

Any other suggestions for handling this. Primarily the issue is with
determining if cookies are enabled, I can re-work the other stuff that goes
on. The cookie checking needs to be invisible to the user.

Unfortunately, I cannot put a meta-refresh in, because without some of the
processing getting done, pages that are dependent on the session processing
that goes on will not work, so I need to kill them BEFORE the page is
loaded.

Thanks

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,100
Latest member
MelodeeFaj
Top