allow a user to signoff

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
 
P

Peter O'Reilly

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.
 
R

Raymond Lewallen

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
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top