Re: logging off (without getting page when click on back )
From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 03/12/04
- Next message: Hernan de Lahitte: "Re: ASP.NET Impersonation vs IIS 6.0 application pool"
- Previous message: Stefan: "Re: logging off (without getting page when click on back )"
- In reply to: DotNetJunkies User: "logging off (without getting page when click on back )"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 12 Mar 2004 10:33:08 -0300
If you are using Forms Authentication, just using
System.Web.Security.FormsAuthentication.SignOut()
will do what you are looking for. This will delete the cookie that Forms
Auth use so a new session will be started (login form retrieved) whenever
you hit some page inside your Forms Auth path. This addresses the issue of
the back navigation as well.
If you are relying on session variables only, you might expire the session
with Sesson.Abandon() method. However, session variables alone are not a
very secure mechanism to handle authentication. You can find further
infromation about this topic and others as well here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/ThreatCounter.asp
(see Chapter 10 for ASP.NET pages.)
-- Hernan de Lahitte Lagash Systems S.A. http://weblogs.asp.net/hernandl Shadowfax Dev Team This posting is provided "AS IS" with no warranties, and confers no rights. "DotNetJunkies User" <User@-NOSPAM-DotNetJunkies.com> wrote in message news:exjhw0ACEHA.3472@TK2MSFTNGP09.phx.gbl... > hi everybody > I posted a question previously on how to design secure pages so that once we log off, we cannot obtain the previous page if we click on back, ie the page must expire when we log off. Somebody posted a link to another message in the forum. Could he plz repost the link, because i am lost with this new build. thanks. > > If anybody else knows how to do it, plz help. i have used the session object and created a session variable, UserValid, which is set to yes when we log in and set to no when we log out and on the page i want to secure, i check whether uservalid=yes .It should work but it works only when i enable trace. It displays a message that page has expired when i click on back , which is exactly what i wanted, but when i disable trace it doesnot work. Any idea on what is wrong? > > --- > Posted using Wimdows.net NntpNews Component - > > Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
- Next message: Hernan de Lahitte: "Re: ASP.NET Impersonation vs IIS 6.0 application pool"
- Previous message: Stefan: "Re: logging off (without getting page when click on back )"
- In reply to: DotNetJunkies User: "logging off (without getting page when click on back )"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|