473,385 Members | 1,642 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,385 software developers and data experts.

Logging off an aspx page but I am to browse back to page

Hello everyone,
I created a logon page using C# ASPX, I have the user logon and if logon
information is correct I do a Response.Redirect(url); On the second page it
displays data and I have a logoff button which does another
Response.Redirect(main url); Here is the issue, I am able to browse back to
that page and the data is still populated and visible. How can I clear the
cache for that page? I have tried:

Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
Page.Response.Cache.SetCacheability(HttpCacheabili ty.NoCache);

And no such luck. I would appreciate the help.
Thank you,
Terry

Nov 19 '05 #1
2 1411
Try using session variables.
set a session variable saying the user is "authenticated" when the user
logons.
and on logoff, set that variable to say the user is not authenticated.
and on the second page, right at the top, check that session variable to see
if the user is authenticated or not.....if not...redirect the user back to
logon page.
"Terry" wrote:
Hello everyone,
I created a logon page using C# ASPX, I have the user logon and if logon
information is correct I do a Response.Redirect(url); On the second page it
displays data and I have a logoff button which does another
Response.Redirect(main url); Here is the issue, I am able to browse back to
that page and the data is still populated and visible. How can I clear the
cache for that page? I have tried:

Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
Page.Response.Cache.SetCacheability(HttpCacheabili ty.NoCache);

And no such luck. I would appreciate the help.
Thank you,
Terry

Nov 19 '05 #2
I have had a similar problem with a shopping cart checkout page. Once the
user checks out you don't want them going back to this page.

What I did was add this to the checkout page

<head>
<script language="javascript">
history.forward();
</script>
</head>

This gives the effect of a disabled the back button. So what happens is when
the user leaves the checkout page and then tries to use the back button, they
are redirected back to the page they are currently viewing... hence they can
never use the back button to go back to the checkout page.

You may be able to use a trick like this. Just add that code to the logon
page and the user will never be able to go back to that page using the back
button.

Hope this helps.
--
Bill
"Terry" wrote:
Hello everyone,
I created a logon page using C# ASPX, I have the user logon and if logon
information is correct I do a Response.Redirect(url); On the second page it
displays data and I have a logoff button which does another
Response.Redirect(main url); Here is the issue, I am able to browse back to
that page and the data is still populated and visible. How can I clear the
cache for that page? I have tried:

Response.Expires = 0;
Response.ExpiresAbsolute = DateTime.Now;
Page.Response.Cache.SetCacheability(HttpCacheabili ty.NoCache);

And no such luck. I would appreciate the help.
Thank you,
Terry

Nov 19 '05 #3

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

Similar topics

3
by: JP SIngh | last post by:
Hi All We have an ASP application which tracks holidays for our employees. When the user logs in we store thier username in a session variable and use that variable when displaying and adding...
4
by: Larry Brindise | last post by:
I have an asp.net application. I have used VStudio Web Deployment Project to create the MSI file. I copy the MSI file from my developer PC to my test server running Win2003Server Web Edition. I...
2
by: Larry Brindise | last post by:
I have deployed an ASP.NET application successfully on Windows 2000 and 2003. When I deploy it on an XP Pro machine (fresh install with framework 1.1 and IIS installed), I get a very unexpected...
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
2
by: nvv via DotNetMonster.com | last post by:
Hi, I am working on a web site which authenticates an user using forms. And once they logout, I observed that, for any reason if they click on "BACK" button of the browser, the user is being taken...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
3
by: Dick | last post by:
How do I integrating ASP.NET Tracing with the Enterprise Library Logging Application Block? I guess this should be possible and in a similar way to the way ASP.NET Tracing is integrated with...
1
by: Tom Kearney | last post by:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I...
4
by: hsn22 | last post by:
im trying to log into orkut so i can do some things on the page. but im having trouble logging into the orkut page. this is as far as i have come (yay!) this is the link that logs people into...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.