473,378 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Forms Auth SignOut Question

I have a Forms Auth and use a button that allows users to SignOut below
but when they sign out and PRESS THE BACK BUTTON they can see the
previous page WHY?

Sub SignOut(objSender As Object, objArgs As EventArgs)
'delete the users auth cookie and sign out
System.Web.Security.FormsAuthentication.SignOut()
Session.Abandon()
Session.Remove("Context.User.Identity.Name")
'redirect the user to their referring page

Response.Redirect("logon.aspx?ReturnUrl=%2fFormsAu thAd%2fdefault.aspx")

End Sub

ANY IDEAS WHAT I'M DOING WRONG!
Thx

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #1
6 1641
"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
I have a Forms Auth and use a button that allows users to SignOut below
but when they sign out and PRESS THE BACK BUTTON they can see the
previous page WHY?

Sub SignOut(objSender As Object, objArgs As EventArgs)
'delete the users auth cookie and sign out
System.Web.Security.FormsAuthentication.SignOut()
Session.Abandon()
Session.Remove("Context.User.Identity.Name")
'redirect the user to their referring page

Response.Redirect("logon.aspx?ReturnUrl=%2fFormsAu thAd%2fdefault.aspx")

End Sub

ANY IDEAS WHAT I'M DOING WRONG!


You're not understanding web applications, that's what!

The back button isn't part of your application. It's part of the users
browser. They can press it whenever they want to. It doesn't send a request
for the previous page to your server! Instead, it just displays what your
server responded with the last time that page was requested.

What happens when the user hits the Back button and then the Refresh button?
Refresh will make a new request to your server.
John Saunders
Nov 19 '05 #2
Patrick Olurotimi Ige wrote:
I have a Forms Auth and use a button that allows users to SignOut below
but when they sign out and PRESS THE BACK BUTTON they can see the
previous page WHY?

Sub SignOut(objSender As Object, objArgs As EventArgs)
'delete the users auth cookie and sign out
System.Web.Security.FormsAuthentication.SignOut()
Session.Abandon()
Session.Remove("Context.User.Identity.Name")
'redirect the user to their referring page

Response.Redirect("logon.aspx?ReturnUrl=%2fFormsAu thAd%2fdefault.aspx")

End Sub

ANY IDEAS WHAT I'M DOING WRONG!
Thx

One possiblity is they are loading the page from their browser's cache.
You would have to try and not cache your pages (using pragma-nocache
and other methods, just search Google and you will find a wealth of
information).

HTH...

Chris
Nov 19 '05 #3
John..
Thanks for the reply..
I do know its not part of my Application but
What 'm asking here is that if there is a WAY!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #4
Thanks Chris for the Idea!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #5
"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
John..
Thanks for the reply..
I do know its not part of my Application but
What 'm asking here is that if there is a WAY!


Patrick,

The user could have taken a screen shot of your previous page. He could then
look at the screen shot whenever he wants to. There's nothing you can do
about that.

The user pressing the Back button is the same thing as the user keeping a
screen shot of the page. It's just an image of something that happened
previously. Even if you play games with the page expiration, there's nothing
you can do to prevent the user from keeping a screen shot of the page, or a
memory of it.

John Saunders
Nov 19 '05 #6
Thanks John for the detailed explanation!
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: john | last post by:
I have 2 questions: 1. I am trying to use forms authentication. When the user logs out, I make these function calls: Session.Abandon(); FormsAuthentication.SignOut(); But after they log out,...
1
by: Rob | last post by:
I have an ASP.NET application that uses forms-based authentication. A user wishes to be able to run multiple sessions of this application simultaneously from the user's client machine. The...
1
by: AVance | last post by:
Hi, I've come across this scenario in ASP.NET 1.1 with forms authentication where the forms auth doesn't seem to timeout correctly, nor redirect to the login page. I have done some testing, and...
5
by: oakleyx | last post by:
Hi, I'm using asp.net form authentication. The problem i'm having is when my cookie expires it redirects me to the login page, so I log in again and it brings me to the page that I was on last...
18
by: Rippo | last post by:
Hi I am using role base forms authentication in asp.net and have come across a problem that I would like advice on. On a successful login a session variable is set to identify a user. This is...
0
by: Tumurbaatar S. | last post by:
My app Web.config contains: <authentication mode="Forms"> <forms name="myauth" loginUrl="default.aspx" protection="All" timeout="1" /> </authentication> And default.aspx shows login/password...
2
by: pv_kannan | last post by:
I recently found out that my authentication cookies are not expiring even though I have set the persist property to false. As a result, users are able to access the secure websites with indifferent...
7
by: mircu | last post by:
Hi, I noticed weird behaviour with the site that is using forms authentication. I am logged to the site from the same machine from two browsers (opened separately, not ctrl-N) as different users...
8
by: =?Utf-8?B?TFc=?= | last post by:
Hello! I am just learning about forms authentication so please excuse this basic question. I am using .NET 1.1 and C#. I have created my web.config file and my login.aspx and the associated cs...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.