Connecting Tech Pros Worldwide Forums | Help | Site Map

Session inconsistencies IIS6

grw
Guest
 
Posts: n/a
#1: Jul 19 '05
Im trying to find why my hosted server won't maintain session state.
Its not a web farm (not load balanced), its all the same server

An application requires a session to be set and then recalled (like you do
:)

However, since the server software was upgraded from IIS 5 to 6, the working
code no longer works.
(ie - login with session variables but get logged out immediately the page
changes)

Using simple code like <%=session.sessionid%> on the IIS6 server, and
refreshing the page shows a new ID most times - it should be the same id??
Testing on the old server (IIS5) would keep the same session id.

Where do I start looking and what pertinent questions do I need to ask my
host?

TIA!



Egbert Nierop \(MVP for IIS\)
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Session inconsistencies IIS6


"grw" <none@none.com> wrote in message
news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...[color=blue]
> Im trying to find why my hosted server won't maintain session state.
> Its not a web farm (not load balanced), its all the same server
>
> An application requires a session to be set and then recalled (like you do
> :)
>
> However, since the server software was upgraded from IIS 5 to 6, the[/color]
working[color=blue]
> code no longer works.
> (ie - login with session variables but get logged out immediately the page
> changes)
>
> Using simple code like <%=session.sessionid%> on the IIS6 server, and
> refreshing the page shows a new ID most times - it should be the same id??
> Testing on the old server (IIS5) would keep the same session id.
>
> Where do I start looking and what pertinent questions do I need to ask my
> host?[/color]

what does the URL you use to confirm this difference, look like? (so I mean,
does it look like http://servername etc)
[color=blue]
> TIA!
>
>
>[/color]

grw
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Session inconsistencies IIS6


Im not sure what you mean 'confirm the difference'? could you clarify for
me?

The old server used exactly the same code - the only way I can test this is
on the new server / software (same hardware)
So yes - the URL is the same format as before (as the web hasnt changed) :
http// www. domain. com /test.asp for example







"Egbert Nierop (MVP for IIS)" <egbert_nierop@nospam.com> wrote in message
news:uSpYMj8FEHA.4044@TK2MSFTNGP10.phx.gbl...[color=blue]
> "grw" <none@none.com> wrote in message
> news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...[color=green]
> > Im trying to find why my hosted server won't maintain session state.
> > Its not a web farm (not load balanced), its all the same server
> >
> > An application requires a session to be set and then recalled (like you[/color][/color]
do[color=blue][color=green]
> > :)
> >
> > However, since the server software was upgraded from IIS 5 to 6, the[/color]
> working[color=green]
> > code no longer works.
> > (ie - login with session variables but get logged out immediately the[/color][/color]
page[color=blue][color=green]
> > changes)
> >
> > Using simple code like <%=session.sessionid%> on the IIS6 server, and
> > refreshing the page shows a new ID most times - it should be the same[/color][/color]
id??[color=blue][color=green]
> > Testing on the old server (IIS5) would keep the same session id.
> >
> > Where do I start looking and what pertinent questions do I need to ask[/color][/color]
my[color=blue][color=green]
> > host?[/color]
>
> what does the URL you use to confirm this difference, look like? (so I[/color]
mean,[color=blue]
> does it look like http://servername etc)
>[color=green]
> > TIA!
> >
> >
> >[/color]
>[/color]


Egbert Nierop \(MVP for IIS\)
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Session inconsistencies IIS6


"grw" <none@none.com> wrote in message
news:OpDQG28FEHA.692@TK2MSFTNGP09.phx.gbl...[color=blue]
> Im not sure what you mean 'confirm the difference'? could you clarify for
> me?
>
> The old server used exactly the same code - the only way I can test this[/color]
is[color=blue]
> on the new server / software (same hardware)
> So yes - the URL is the same format as before (as the web hasnt changed) :
> http// www. domain. com /test.asp for example
>[/color]

That looks quite normal. Maybe, you got code that is tested on old ADO ,
but on IIS 6, ADO 2.8 is used, the exception leads to a 'loggedin' session
variable not to be set(and abandon to be called??). There is, any way, no
special new switch on IIS 6 for normal sessions.

Ken Schaefer
Guest
 
Posts: n/a
#5: Jul 19 '05

re: Session inconsistencies IIS6


Ask your hosting company if they are using a web garden for the application
pool that your website is in. If the app pool is served by multiple worker
processes (i.e. a web garden), then you will experience the symptoms you are
seeing. This is because each worker process has it's own memory, and ASP
sessions are stored in-memory. So, the first request creates a new session.
The second request gets served (50% of the time) by the second worker
process, that doesn't know anything about the first session, and starts
another one.

Cheers
Ken

"grw" <none@none.com> wrote in message
news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...
: Im trying to find why my hosted server won't maintain session state.
: Its not a web farm (not load balanced), its all the same server
:
: An application requires a session to be set and then recalled (like you do
: :)
:
: However, since the server software was upgraded from IIS 5 to 6, the
working
: code no longer works.
: (ie - login with session variables but get logged out immediately the page
: changes)
:
: Using simple code like <%=session.sessionid%> on the IIS6 server, and
: refreshing the page shows a new ID most times - it should be the same id??
: Testing on the old server (IIS5) would keep the same session id.
:
: Where do I start looking and what pertinent questions do I need to ask my
: host?
:
: TIA!
:
:
:


Dominique
Guest
 
Posts: n/a
#6: Jul 19 '05

re: Session inconsistencies IIS6


The only people who can help you here will be the hosting company.
This is just an IIS setting problem.


"grw" <none@none.com> wrote in message
news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...[color=blue]
> Im trying to find why my hosted server won't maintain session state.
> Its not a web farm (not load balanced), its all the same server
>
> An application requires a session to be set and then recalled (like you do
> :)
>
> However, since the server software was upgraded from IIS 5 to 6, the[/color]
working[color=blue]
> code no longer works.
> (ie - login with session variables but get logged out immediately the page
> changes)
>
> Using simple code like <%=session.sessionid%> on the IIS6 server, and
> refreshing the page shows a new ID most times - it should be the same id??
> Testing on the old server (IIS5) would keep the same session id.
>
> Where do I start looking and what pertinent questions do I need to ask my
> host?
>
> TIA!
>
>
>[/color]


David Wang [Msft]
Guest
 
Posts: n/a
#7: Jul 19 '05

re: Session inconsistencies IIS6


What Ken suggested (Is Web Garden enabled) would be my first suggestion

Basically, session state is a blob of memory that is not explicitly shared
between any worker process. Thus, session state gets lost when you move
between processes, and things that trigger this include:
1. Worker process recycling via a variety of triggers. Common ones include
idle timeout (default 15 minutes) or periodic recycling (default 29 hours)
2. Web Garden -- new connection goes to a new worker process, cycling
through the max number of worker processes in the garden
3. Something crashes the worker process.

This is best addressed by moving session state out of the worker process.
For example, ASP.Net session state service does this for ASP.Net, and Egbert
has one for ASP as well.

--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"grw" <none@none.com> wrote in message
news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...
Im trying to find why my hosted server won't maintain session state.
Its not a web farm (not load balanced), its all the same server

An application requires a session to be set and then recalled (like you do
:)

However, since the server software was upgraded from IIS 5 to 6, the working
code no longer works.
(ie - login with session variables but get logged out immediately the page
changes)

Using simple code like <%=session.sessionid%> on the IIS6 server, and
refreshing the page shows a new ID most times - it should be the same id??
Testing on the old server (IIS5) would keep the same session id.

Where do I start looking and what pertinent questions do I need to ask my
host?

TIA!




grw
Guest
 
Posts: n/a
#8: Jul 19 '05

re: Session inconsistencies IIS6



"Egbert has one for ASP as well."

What does that look like? thanks for all the ideas!



"David Wang [Msft]" <someone@online.microsoft.com> wrote in message
news:%23G46pjDGEHA.2656@TK2MSFTNGP09.phx.gbl...[color=blue]
> What Ken suggested (Is Web Garden enabled) would be my first suggestion
>
> Basically, session state is a blob of memory that is not explicitly shared
> between any worker process. Thus, session state gets lost when you move
> between processes, and things that trigger this include:
> 1. Worker process recycling via a variety of triggers. Common ones[/color]
include[color=blue]
> idle timeout (default 15 minutes) or periodic recycling (default 29 hours)
> 2. Web Garden -- new connection goes to a new worker process, cycling
> through the max number of worker processes in the garden
> 3. Something crashes the worker process.
>
> This is best addressed by moving session state out of the worker process.
> For example, ASP.Net session state service does this for ASP.Net, and[/color]
Egbert[color=blue]
> has one for ASP as well.
>
> --
> //David
> IIS
> This posting is provided "AS IS" with no warranties, and confers no[/color]
rights.[color=blue]
> //
> "grw" <none@none.com> wrote in message
> news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...
> Im trying to find why my hosted server won't maintain session state.
> Its not a web farm (not load balanced), its all the same server
>
> An application requires a session to be set and then recalled (like you do
> :)
>
> However, since the server software was upgraded from IIS 5 to 6, the[/color]
working[color=blue]
> code no longer works.
> (ie - login with session variables but get logged out immediately the page
> changes)
>
> Using simple code like <%=session.sessionid%> on the IIS6 server, and
> refreshing the page shows a new ID most times - it should be the same id??
> Testing on the old server (IIS5) would keep the same session id.
>
> Where do I start looking and what pertinent questions do I need to ask my
> host?
>
> TIA!
>
>
>
>[/color]


grw
Guest
 
Posts: n/a
#9: Jul 19 '05

re: Session inconsistencies IIS6


Solved as a result thanks Ken.

"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:OcaFYt9FEHA.1840@TK2MSFTNGP12.phx.gbl...[color=blue]
> Ask your hosting company if they are using a web garden for the[/color]
application[color=blue]
> pool that your website is in. If the app pool is served by multiple worker
> processes (i.e. a web garden), then you will experience the symptoms you[/color]
are[color=blue]
> seeing. This is because each worker process has it's own memory, and ASP
> sessions are stored in-memory. So, the first request creates a new[/color]
session.[color=blue]
> The second request gets served (50% of the time) by the second worker
> process, that doesn't know anything about the first session, and starts
> another one.
>
> Cheers
> Ken
>
> "grw" <none@none.com> wrote in message
> news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...
> : Im trying to find why my hosted server won't maintain session state.
> : Its not a web farm (not load balanced), its all the same server
> :
> : An application requires a session to be set and then recalled (like you[/color]
do[color=blue]
> : :)
> :
> : However, since the server software was upgraded from IIS 5 to 6, the
> working
> : code no longer works.
> : (ie - login with session variables but get logged out immediately the[/color]
page[color=blue]
> : changes)
> :
> : Using simple code like <%=session.sessionid%> on the IIS6 server, and
> : refreshing the page shows a new ID most times - it should be the same[/color]
id??[color=blue]
> : Testing on the old server (IIS5) would keep the same session id.
> :
> : Where do I start looking and what pertinent questions do I need to ask[/color]
my[color=blue]
> : host?
> :
> : TIA!
> :
> :
> :
>
>[/color]


zee
Guest
 
Posts: n/a
#10: Sep 9 '06

re: Session inconsistencies IIS6



Hi there, the last post states that the problem was solved, i was hoping
that it had more info as to what he/she did to solve the problem.

i read the suggestions on the web garden, i launched my IIS and saw
that the web gardens options are there when you look at the properties
of the application pool.

Would a good solution to the ASP sessions loosing data be, to

create a new application pool,
enable the recycle worker process at the following times and select 1
am or something.
uncheck shutdown workerprocess (would you recomend this?)
set the maximum number of worker processes to 1. (or can you switch of
this featuer some other way?)


The reason why i ask is because we just asked 10 of our clients to get
new servers and they all upgraded to server 2003 :)

the application is an ASP application, that relies heavily on session
variables...

any help would be appreciated, thank you.,.




grw wrote:
Quote:
*Solved as a result thanks Ken.
>
"Ken Schaefer" <kenREMOVE@THISadOpenStatic.comwrote in message
news:OcaFYt9FEHA.1840@TK2MSFTNGP12.phx.gbl...
Quote:
Ask your hosting company if they are using a web garden for the
application
Quote:
pool that your website is in. If the app pool is served by multiple
worker
Quote:
processes (i.e. a web garden), then you will experience the
symptoms you
are
Quote:
seeing. This is because each worker process has it's own memory,
and ASP
Quote:
sessions are stored in-memory. So, the first request creates a new
session.
Quote:
The second request gets served (50% of the time) by the second
worker
Quote:
process, that doesn't know anything about the first session, and
starts
Quote:
another one.

Cheers
Ken

"grw" <none@none.comwrote in message
news:u8vKJK8FEHA.1228@TK2MSFTNGP11.phx.gbl...
: Im trying to find why my hosted server won't maintain session
state.
Quote:
: Its not a web farm (not load balanced), its all the same server
:
: An application requires a session to be set and then recalled
(like you
do
Quote:
: :)
:
: However, since the server software was upgraded from IIS 5 to 6,
the
Quote:
working
: code no longer works.
: (ie - login with session variables but get logged out immediately
the
page
Quote:
: changes)
:
: Using simple code like <%=session.sessionid%on the IIS6 server,
and
Quote:
: refreshing the page shows a new ID most times - it should be the
same
id??
Quote:
: Testing on the old server (IIS5) would keep the same session id.
:
: Where do I start looking and what pertinent questions do I need
to ask
my
Quote:
: host?
:
: TIA!
:
:
:

*


--
zee
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message169045.html

Closed Thread