Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 14th, 2008, 08:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default How to stop Back Navigation after Logout

hi all,

i am developing a Web-app in ASP.NET 2.0

the prob i m facing is:
user is able to navigate BACK and FORWARD to the User-page even after logout.

i hv cleared the Cache also, but it doesnt work.

plz help,

thnx,
Ashu



  #2 (permalink)  
Old April 14th, 2008, 07:37 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The only solution I've found for this is to set explicit expirations on your pages. If you force the page to always be expired, the browser should always try to request it from the server again. When the user logs out, it will clear whatever mechanism is tracking them (forms auth ticket cookie, session data, etc). Then the re-request to the server will see they are not authenticated any more and they'll be forced back to the login page (or at least to a "you aren't logged in" notice).

-Peter
peterlanoie.blog
  #3 (permalink)  
Old April 14th, 2008, 09:58 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: India.
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

i hv tried tht also..
and its working only whn i use the web-app on the local machine. it displays the message "Page has been expired"

bt whn i access the web-app from remote machine, it goes back to the user-home page after logout.
any ideas why the behavior changes whn i use the web-app from remote machine???

  #4 (permalink)  
Old April 14th, 2008, 11:23 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Aside the possibility that the machine you are testing from already has a cached version of the page(s), I can't imagine why it would behave differently. I would imagine that expiration is expiration.

-Peter
peterlanoie.blog
  #5 (permalink)  
Old April 15th, 2008, 12:37 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi
i also need to apply this. can you provide code how you set this.

thanks......


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop button won't stop loop JDShaffer Visual Basic 2008 Essentials 3 May 23rd, 2008 03:22 PM
logout back button. dee J2EE 0 February 14th, 2007 04:38 PM
logout TIME and logout DATE crmpicco Classic ASP Databases 2 January 20th, 2005 12:01 AM
logout TIME and logout DATE crmpicco Classic ASP Basics 0 January 19th, 2005 07:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.