HttpApplication - Best event to work with Session & Cookies

  • Thread starter Thread starter Mike Gleason jr Couturier
  • Start date Start date
M

Mike Gleason jr Couturier

Hi,

When a user log itself in my web site, I set a cookie.
When the use come back after, let's say, a day, I check the cookie and set a
value in the user's Session (If the cookie exists). I also update the
cookie.

I need to do this before the page gets processed.

Where in the application chain would you put this piece of code (the part
where it manipulates the cookies and the session)

Thanks !

Mike
 
you want the PreRequestHandlerExecute event, it fires between load state and
process request.

-- bruce (sqlwork.com)
 
bruce barker said:
you want the PreRequestHandlerExecute event, it fires between load state
and
process request.

It's weird, it seems I already tried it. But I remembered that It made my
AJAX JavaScript failed and my CSS failed when loading the page...

I'll retry tonight when back home, thanks!

Mike
 
bruce barker said:
you want the PreRequestHandlerExecute event, it fires between load state
and
process request.

Cool everything's working fine....

I made a javascript error that caused all the site to break because I was
setting my cookie via a RegisterstartupScript (It seems AJAX asynch postback
doesn't parse cookie headers).

Thanks!
 
Back
Top