473,769 Members | 6,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Redire ct(url); On the second page it
displays data and I have a logoff button which does another
Response.Redire ct(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.Expire s = 0;
Response.Expire sAbsolute = DateTime.Now;
Page.Response.C ache.SetCacheab ility(HttpCache ability.NoCache );

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

Nov 19 '05 #1
2 1429
Try using session variables.
set a session variable saying the user is "authentica ted" 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.Redire ct(url); On the second page it
displays data and I have a logoff button which does another
Response.Redire ct(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.Expire s = 0;
Response.Expire sAbsolute = DateTime.Now;
Page.Response.C ache.SetCacheab ility(HttpCache ability.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="javas cript">
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.Redire ct(url); On the second page it
displays data and I have a logoff button which does another
Response.Redire ct(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.Expire s = 0;
Response.Expire sAbsolute = DateTime.Now;
Page.Response.C ache.SetCacheab ility(HttpCache ability.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
1540
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 data to the access database. The username is the primary key for the database table. strUsername = request.form("UserName") set RS = server.createobject("ADODB.recordset") MySql="select * from empprofile where empname ='" & strUserName & "'"
4
1892
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 run the MSI to install - looks good so far - I see the global directory, etc. I try opening the app in IE via www.myweb.com/aspxfolder; where aspxfolder is the global directory. I get the wonderful "HTTP Error 404 - File or directory not found"...
2
1473
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 result. Keep in mind I install everything as "default" as it gets, IIS included. I install my project into a virtual directory, so I browse to my installed site as: http://localhost/myproject Yes, there is a file called "default.aspx" in my...
5
2073
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 that he wants me to do something through which only one user can login using any given account name. I mean to say, for example, when a user called "abc" is online, another person shouldn't be
2
3239
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 back to the site instead taking them to "login" page. I used formsAuthentication signout method and also used session's abandon method in signout event. Still I don't know why I am facing that problem. Please tell me what else I need to do in order to...
2
2909
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 users). If user is from intranet, web server should recognize it and application should create additional options in controls regarding groups the user belongs to. If user is from extranet it should be logged in as anonymous and a link to login page...
3
2602
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 System.Diagnostics Tracing as described in http://msdn2.microsoft.com/en-us/library/b0ectfxd(VS.80).aspx. But I would have thought this is something most ASP developers using the Logging Application Block would want to do and therefore I expected to...
1
4830
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 get a compilation error (Compiler Error Message: CS0234: The type or namespace name 'Logging' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?)). I can import the "Microsoft.VisualBasic" namespace...
4
5354
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 orkut. it takes two values through the fields "Email" and "Passwd". then after calling ServiceLoginAuth, redirects to the orkut home page if the input is correct. so i tried to post the values into Email and Passwd using urllib's urlencode function....
0
9587
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.