Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Sessions not working correctly on ASP page

Reply
Thread Tools

Sessions not working correctly on ASP page

 
 
Curt Morrison
Guest
Posts: n/a
 
      10-29-2005
I have an ASP login section on my site that is experiencing some problems.

Go to the following page and create a fake account (this is a test
environment, so don't worry):

http://seminarystreet.com/dev_testin...on/default.asp

Upon completion, you will be redirected to the login page, the new login
credentials are automatically inserted into the username and password
fields.

Click the Login button. Once logged in, click the logout button and you will
get a an error from my logout script, it completely refuses to log the
visitor out. I have SQL insert statement used for auditing that is expecting
the account_id to be passed, but it isn't there for some reason. Regardless,
with or without that statement, the logout fails.

Close out of the browser and go directly to the login page again, log in
using the same credentials and try logging out. It works correctly.

Now if you create a new account, close out of your browser and start a new
session and login, it works fine too. I'm at a loss of words on this one, so
any suggestions would really be appreciated. I've included links to the
associated pages below so that you can view the code:

Registration page:
http://seminarystreet.com/dev_testin...on/default.txt

Login page:
http://seminarystreet.com/dev_testin...in/default.txt

Includes:
http://seminarystreet.com/dev_testin...des/global.txt
http://seminarystreet.com/dev_testin...sec-public.txt
http://seminarystreet.com/dev_testin...ec-private.txt

Like I said, any suggestions would be greatly appreciated.

Thanks,
Curt




 
Reply With Quote
 
 
 
 
Curt Morrison
Guest
Posts: n/a
 
      10-30-2005
"Curt Morrison" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have an ASP login section on my site that is experiencing some problems.


Sorry, I made a mistake, you need to go to:

http://www.seminarystreet.com/dev_testing/

Then click on the register for free link. If you go directly to the
registration page, rather than via a link, it works fine. But, if you go to
the registration page a link, it doesn't work. The links are done via
include files and are full URLs rather than relative. Does anyone know if
ASP sessions can be affected by something like this?


 
Reply With Quote
 
 
 
 
Curt Morrison
Guest
Posts: n/a
 
      10-30-2005
"Curt Morrison" <(E-Mail Removed)> wrote in message:

I narrowed the problem down (I think), but could use some help.

The problem occurs when clicking on the following registration link from any
page:

<!--#include file="../includes/navigation/login-status.asp" -->

=============================================
<%
If varLoginStatus = 1 Then
Response.Write("You are currently logged on as: <a
href=""http://www.seminarystreet.com/dev_testing/my_account/default.asp""
title=""View and make changes to your account"">" & varFullName & "</a>. If
this is not you, <a
href=""http://www.seminarystreet.com/dev_testing/login/logout.asp" & "?" &
strSessLogout & """ onClick=""return confirm_LogOut(this.href);"">Click
Here</a>.")
ElseIf varLoginStatus = 0 Then
Response.Write("You are not currently logged on. Existing customers can <a
href=""http://www.seminarystreet.com/dev_testing/login/default.asp"">login</a>.
New customers can <a
href=""http://seminarystreet.com/dev_testing/registration/default.asp"">register
for free</a>.")
End If
%>
=============================================

If I put the include file in the same folder as the page I am linking from,
the problem goes away. Anyone know of a way to fix this?


 
Reply With Quote
 
Tired
Guest
Posts: n/a
 
      10-30-2005
"Curt Morrison" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> "Curt Morrison" <(E-Mail Removed)> wrote in message:
>
> I narrowed the problem down (I think), but could use some help.
>
> The problem occurs when clicking on the following registration link
> from any page:
>
> <!--#include file="../includes/navigation/login-status.asp" -->


Isn't it backslash in 'include file', forward slash in 'include virtual'.

My eyes won't focus tonight, I can't concentrate, and I may be completely
wrong - but if you're still awake you might appreciate *any* pointers.

 
Reply With Quote
 
Curt Morrison
Guest
Posts: n/a
 
      10-30-2005
"Curt Morrison" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have an ASP login section on my site that is experiencing some problems.
>
> Click the Login button. Once logged in, click the logout button and you
> will
> get a an error from my logout script, it completely refuses to log the
> visitor out. I have SQL insert statement used for auditing that is
> expecting
> the account_id to be passed, but it isn't there for some reason.
> Regardless,
> with or without that statement, the logout fails.


Turns-out that the problem was ASP session state related. I changed all of
my session("") variables to cookies and the problem is fixed.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving from ASP Sessions to Database Sessions Bookham Measures ASP General 19 08-23-2007 03:51 PM
Cookieless Sessions (Sessions Without Cookies) and Security scottymo ASP .Net Security 3 09-29-2006 11:00 PM
State not working properly -- sessions and ASP.NET 2.0 Profiles ASP .Net 1 08-24-2006 12:14 PM
ASP Sessions not working live Guy Hocking ASP General 14 01-26-2004 07:47 PM
Re: Relationship between IIS Sessions and ASP.NET Sessions? Ken Cox [Microsoft MVP] ASP .Net 1 08-08-2003 03:22 PM



Advertisments