Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

How to prevent a logged-out user from navigating to past pages?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard - 17 Aug 2007 01:43 GMT
Hi,

After the user is signed out and taken to the login page, they can still use
the back & history features in the browser to access pages. Every page
(except login) has a check at the beginning to redirect the user after being
logged out, but when the page is accessed via back button, the debugger
doesn't stop at that code b/c the page is cached and is not generated at the
server.

How can I make these pages disappear from the history?

Thank you in advance,

Richard
Ladislav Mrnka - 17 Aug 2007 08:26 GMT
Hi Richard,
you have to turn off caching of your web pages on client browser. Put
following directive <%@ OutputCache Location="None" VaryByParam="None" %> to
each page you are securing by authentication so when client press back button
it will force browser to request the page from server and to load it from
cache.

You can also make caching profile in your web.config file and load profile
in your pages, your settings will be centralized.

<system.web>
 <outputCacheSettings>
   <outputCacheProfiles>
     <add name="myProfile" location="None" VaryByParam="None" />
   </outputCacheProfiles>
 </outputCacheSettings>
</system.web>

Each page will refernce your profile by adding this directive:
<%@ OutputCache CacheProfile="myProfile" />

Best regards,
Ladislav

<

Regards,
Ladislav

> Hi,
>
[quoted text clipped - 10 lines]
>
> Richard

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.