By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,302 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,302 IT Pros & Developers. It's quick & easy.

Strange behavior session on IIS6

P: n/a
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


Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

"Ronald" <Ro****@iets.nl> wrote in message
news:ut******************@amsnews05.chello.com...
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



Jul 19 '05 #2

P: n/a
Within the test-script the sessionvariable is unique, so it is not possible
that de sessionvariable is alterd by another script.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:ue**************@TK2MSFTNGP11.phx.gbl...
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

"Ronald" <Ro****@iets.nl> wrote in message
news:ut******************@amsnews05.chello.com...
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




Jul 19 '05 #3

P: n/a
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

"Ronald" <Ro****@iets.nl> wrote in message
news:HW******************@amsnews05.chello.com...
Within the test-script the sessionvariable is unique, so it is not possible that de sessionvariable is alterd by another script.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:ue**************@TK2MSFTNGP11.phx.gbl...
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

"Ronald" <Ro****@iets.nl> wrote in message
news:ut******************@amsnews05.chello.com...
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





Jul 19 '05 #4

P: n/a
Trust me. there are only 3 asp-scripts in the website.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:Od**************@TK2MSFTNGP09.phx.gbl...
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

"Ronald" <Ro****@iets.nl> wrote in message
news:HW******************@amsnews05.chello.com...
Within the test-script the sessionvariable is unique, so it is not

possible
that de sessionvariable is alterd by another script.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:ue**************@TK2MSFTNGP11.phx.gbl...
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

"Ronald" <Ro****@iets.nl> wrote in message
news:ut******************@amsnews05.chello.com...
> 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
>
>
>
>
>
>
>
>



Jul 19 '05 #5

P: n/a
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

"Ronald" <Ro****@iets.nl> wrote in message
news:x9******************@amsnews05.chello.com...
Trust me. there are only 3 asp-scripts in the website.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:Od**************@TK2MSFTNGP09.phx.gbl...
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

"Ronald" <Ro****@iets.nl> wrote in message
news:HW******************@amsnews05.chello.com...
Within the test-script the sessionvariable is unique, so it is not

possible
that de sessionvariable is alterd by another script.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:ue**************@TK2MSFTNGP11.phx.gbl...
> 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
>
> "Ronald" <Ro****@iets.nl> wrote in message
> news:ut******************@amsnews05.chello.com...
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
>
>



Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.