473,657 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A basic session question - must have at every site.

2 New Member
Hello.
I have a problem with closing a session and moving to the regular page.
The process is between 3 ASP pages:
(1)References.a sp (2)SignIn1.asp (3)SignIn2.asp

the first page is a form that contains the references to the pages in the site. it contains the sign in button.
the action of the form redirects it to the second page which checks if the user is in the database and if the user is in database it redirects it to the third page and sets the session "SignedIn" to true.
the third page is a copy of the first page with few changes, such as the sign out button. the action of this page is redirecting it to the first page after the sign out button is pressed and sets the session "SignedIn" to false.
as you can see there is a loop between those three pages.

the problem is: when i click the sign out button in the third page it works good and redirects to the first page. but when i click on a reference after signing out, it redirects me to the third page again and shows that the user is signed in.

one more thing, in the first page there is a condition that checks if the user exists or not. if the user is not in the database it set's the session "SignedIn"
to false, and shows a massege. the "else" says that if user exists it set's the session "SignedIn" to true and redirects to the second page.
now to the point - when i press the sign out button it is working properly (but not if i press other references after signing out). now if i enter an invalid user name or password it shows me the massege. after that the problem is solved and the site is working normally. because of that i think the problem is in the session and that i need to learn how and where to close it.
Jun 19 '07 #1
2 1315
aharonhere
2 New Member
I'm sorry but I forgot to mention something at the original post.
I'm checking the session at every page in the site. I guess that only means that the problem is in the session and that it must be closed.
Jun 19 '07 #2
danp129
323 Recognized Expert Contributor
Post the code for setting the session and checking the session. You can use session.Abandon to remove all session variables.
Jun 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

27
7111
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
14
1865
by: qaz | last post by:
I've always used session cookies in my web sites. However, since more and more people (including me) are starting to disable cookies, I'm beginning to think that I should change my ways and design websites without the use of session cookies. I've never done it before, but I understand that we can get around the use of session cookies either by writing data to a database or by passing data from one page to the next with hidden fields. Can...
3
1567
by: MrShovel | last post by:
I'm new to this ASP.NET caper and have the following questions. I have a TestObject that contains about 50 fields of data and 3 member procedures. Below is a simplified explanation of what I do. At the start of each session I initialise this TestObject. On entering every page I create a local TestObject and do this: TestObject = Session("TestObject")
10
2182
by: Li Pang | last post by:
Hi, I created a html page from which I give a link to another web site. The new site is opened in a new window. When I opened multiple windows, they all have the same SessionID. I want ot know how to open the windows with different sessionID. Thanks
2
2636
by: Gordon Burditt | last post by:
I had this idea about preventing session fixation, and I'm wondering what anyone else thinks about it. The idea is, essentially, don't allow session ids that YOUR PHP didn't generate (and aren't yet expired) to log in. That way if someone sticks a made-up session ID on a URL, it won't matter, unless it happens to correspond to an active session (guessing a user password is probably easier). Is this already standard practice, new, or is...
0
1288
by: TheOld | last post by:
Server: Windwos 2000 IIS: 5 Hi, In my web application the user can't access from more pc in the site... Every user have a password that are stores in the session Every time they enter in the site i check their password in the session i handled the session with Application:
0
1403
by: TheOld | last post by:
Server: Windwos 2000 IIS: 5 Hi, In my web application the user can't access from more pc in the site... Every user have a password that are stores in the session Every time they enter in the site i check their password in the session i handled the session with Application:
4
2152
by: Alex | last post by:
Hello, This is a follow-up to my earlier post about having issues with our application pool recycling. We currently use Session State InProc, but if I were to choose to move the existing application to SQL instead, would the only change in the application be the SessionState setting within web.config? I know I'd also need to setup our MS SQL database to handle sessions (detailed in MS Article 317604), but outside of this, is there...
8
4188
by: YYZ | last post by:
I'm using asp, not asp.net. I've got some open ended questions that I was really hoping someone in here could answer, or direct me to some resources that will help me answer them on my own. First, the session object. When a new user comes to my site, asp creates a session object, and a session id on that object. That session id is sent back to the client and stored as a cookie(?) that can be used to identify a single user across...
0
8394
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
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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
7327
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...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4152
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
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.