Author: pgacv2 | Posted on: 6/9/2009 10:20:00 AM | Views : 424

Hello,
My shopping cart application uses a session variable to store the items currently in the shopping cart, but uses a custom membership provider to handle user authentication. The user doesn't have to log on just to place items in the cart, but they do need to authenticate in order to check out. Logging on and off works fine, but I need to be able to clear the shopping cart when the user logs off, otherwise someone else who sits at the computer could see what the previous user was shopping for, even after the previous user logged out.

I've been looking for some kind of logout event provided by the Membership API, but haven't found any. I've read suggestions to put session cleanup code in Session_End in Global.asax, but it's not being executed when the user clicks the logout link. (I suppose this is because Session_End only executes on session timeout?) *Is* there a logout event that can be used with the membership provider or forms authentic ...

Go to the complete details ...