Session inconsistencies IIS6

Discussion in 'ASP General' started by grw, Apr 1, 2004.

  1. grw

    grw Guest

    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, Apr 1, 2004
    #1
    1. Advertising

  2. "grw" <> wrote in message
    news:...
    > 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)

    > TIA!
    >
    >
    >
     
    Egbert Nierop \(MVP for IIS\), Apr 1, 2004
    #2
    1. Advertising

  3. grw

    grw Guest

    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)" <> wrote in message
    news:...
    > "grw" <> wrote in message
    > news:...
    > > 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)
    >
    > > TIA!
    > >
    > >
    > >

    >
     
    grw, Apr 1, 2004
    #3
  4. "grw" <> wrote in message
    news:...
    > 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.
     
    Egbert Nierop \(MVP for IIS\), Apr 1, 2004
    #4
  5. grw

    Ken Schaefer Guest

    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" <> wrote in message
    news:...
    : 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!
    :
    :
    :
     
    Ken Schaefer, Apr 1, 2004
    #5
  6. grw

    Dominique Guest

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


    "grw" <> wrote in message
    news:...
    > 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, Apr 1, 2004
    #6
  7. 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" <> wrote in message
    news:...
    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!
     
    David Wang [Msft], Apr 1, 2004
    #7
  8. grw

    grw Guest

    "Egbert has one for ASP as well."

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



    "David Wang [Msft]" <> wrote in message
    news:%...
    > 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" <> wrote in message
    > news:...
    > 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, Apr 2, 2004
    #8
  9. grw

    grw Guest

    Solved as a result thanks Ken.

    "Ken Schaefer" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > : 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, Apr 2, 2004
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QUxQTw==?=

    Datagrid bind inconsistencies.......

    =?Utf-8?B?QUxQTw==?=, Nov 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    346
    Eliyahu Goldin
    Nov 15, 2005
  2. =?Utf-8?B?QUxQTw==?=

    Datagrid binding inconsistencies...............

    =?Utf-8?B?QUxQTw==?=, Nov 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    395
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Nov 15, 2005
  3. Anand S Bisen
    Replies:
    2
    Views:
    2,246
    Steve Holden
    Mar 4, 2005
  4. Darren Dale

    python style guide inconsistencies

    Darren Dale, Apr 22, 2007, in forum: Python
    Replies:
    8
    Views:
    349
    Terry Reedy
    Apr 23, 2007
  5. Rui Maciel

    swprintf declaration inconsistencies?

    Rui Maciel, Jul 3, 2007, in forum: C Programming
    Replies:
    3
    Views:
    416
    Rui Maciel
    Jul 3, 2007
Loading...

Share This Page