Session inconsistencies IIS6

G

grw

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!
 
E

Egbert Nierop \(MVP for IIS\)

grw said:
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?

what does the URL you use to confirm this difference, look like? (so I mean,
does it look like http://servername etc)
 
G

grw

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
 
E

Egbert Nierop \(MVP for IIS\)

grw said:
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

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.
 
K

Ken Schaefer

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

: 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!
:
:
:
 
D

Dominique

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

David Wang [Msft]

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.
//
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!
 
G

grw

"Egbert has one for ASP as well."

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

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,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top