Strange behavior session on IIS6

R

Ronald

Hi there!

I have a website partly written in ASP in where a shoppingbasket is used.
The products of the shoppingbasket are stored in the session-object. (We
use IIS6 on Windows 2003). This was working well for a couple of days. But,
after a while everytime I reload the shoppingbasket I see different products
which I've never added. So it seems like I'm seeing the basket of another
customer.

As it seemed IIS was 'sharing' sessions between different users I created
this little testcode:
---------------
if Session("P")="" then
Session("P") = 1
else
Session("P") = Session("P")+1
end if
Response.Write "*" & Session("P") & "*" & Session.SessionID
---------------

It should return always an iterating numer (1 , 2 3, etc etc). But sometimes
incosistent it jumps back to a previous number or starts at 1 and after a
while jumpe back to for example 365.

As I never experienced this behavior before I tried the same on Windows 2000
(IIS5). Both the testscript and the shoppingbasket are working correctly. So
It seems there is a bug in IIS6 or there there is something mis-configured.

What am I doing wrong here?

Regards,

Ronald
 
R

Ray at

You are correct that this should just give you 1,2,3,4... But, is your cart
system its own application in IIS? Is it possible that there are other
pages in your site that are using this same session variable name? Session
variables are application-wide.

Ray at work
 
R

Ronald

Within the test-script the sessionvariable is unique, so it is not possible
that de sessionvariable is alterd by another script.
 
R

Ray at

You verified this really fast. You know for a fact that throughout the rest
of the entire site, assuming it's all one application, that this session
variable is not used anywhere else?

Ray at work
 
R

Ray at

You're using Session("var") everywhere, as opposed to Application("var"),
correct?

When you reload this page, does the session ID ever change?

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top