allow a user to signoff

  • Thread starter Thread starter sklett
  • Start date Start date
S

sklett

I need to allow a user to sign off from the admin section of my site. I am
using forms based authentication again a DB.
I have read several articles today... none mention how to do this. I guess
I could force an expiration of the cookie, but there must be a cleaner way.

Anyone know one?

Thanks-
Steve
 
I could force an expiration of the cookie, but there must be a cleaner
way.

That's the way it is done, setting an expire date in the past - whether
using client side JavaScript or server side ASP.NET code execution.
 
Steve,

If you are using FormsAuthentication, you can do
FormsAuthentication.SignOut() and this will destroy the ticket associated
with the user. I put this in an event for a button and then
Response.Redirect(BackToMainPageOrWhereEver) after the SignOut() is called.
In my case, I also do a session.destroy before the Response.Redirect as
well.

HTH,

Raymond Lewallen
 
Back
Top