473,503 Members | 1,720 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.asp (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 1303
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
7085
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...
14
1848
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...
3
1558
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....
10
2164
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...
2
2624
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...
0
1280
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...
0
1398
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...
4
2146
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...
8
4174
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. ...
0
7192
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,...
0
7261
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,...
0
7315
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...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
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...
0
5559
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,...
1
4991
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...
0
4665
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...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.