Session Data Lost on Response.Redirect with IIS 6.0

Discussion in 'ASP .Net' started by deisner@dataprise.com, Jun 2, 2006.

  1. Guest

    All-

    I have a Framework 2.0 application running under Windows 2003 Server
    and IIS utilizing the default application pool.

    On my development machine (XP w/ IIS 5.1) the code runs perfectly. But
    when deployed recompiled under 2003/6.0, every time the application
    gets to a Response.Redirect (happens right away when a user logs in),
    the Session data is lost.

    What I have investigated is this:
    1. The application is not restarting
    2. We've already deleted and recreated the virtual folder and
    application
    3. No wierd permission issues that I can see

    I've seen lots of posts suggesting using Server.Transfer, but
    Response.Redirect works fine under development. This is wierd. Any help
    is appreciated.

    -David
    , Jun 2, 2006
    #1
    1. Advertising

  2. It could be your Application Pool settings.

    If you are running in IIS6 mode, your web sites will be using Application
    Pools. If your app pools are set to run using multiple processes, then cache
    & session information will be inconsistently accessible to aspx pages. Check
    the number of processes for your IIS 6 app pool. If it's 1, then that's the
    cause. Or if different virtual dirs on your site have different pools, that
    could also cause the results you see.


    --Peter
    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "" wrote:

    > All-
    >
    > I have a Framework 2.0 application running under Windows 2003 Server
    > and IIS utilizing the default application pool.
    >
    > On my development machine (XP w/ IIS 5.1) the code runs perfectly. But
    > when deployed recompiled under 2003/6.0, every time the application
    > gets to a Response.Redirect (happens right away when a user logs in),
    > the Session data is lost.
    >
    > What I have investigated is this:
    > 1. The application is not restarting
    > 2. We've already deleted and recreated the virtual folder and
    > application
    > 3. No wierd permission issues that I can see
    >
    > I've seen lots of posts suggesting using Server.Transfer, but
    > Response.Redirect works fine under development. This is wierd. Any help
    > is appreciated.
    >
    > -David
    >
    >
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jun 2, 2006
    #2
    1. Advertising

  3. Guest

    Thanks Peter,

    Good advice. I actually found the problem. Would you believe that my
    test server had an underscore in it - something that is not recommended
    by MSFT, but can be overridden. This, along with a relatively recent
    security patch on Windows 2003 from MSFT, effectively blocks
    page-to-page redirects on the session side. Bottom line, don't name
    your servers running IIS with anything else but standard symbols.
    Thanks again.

    Peter wrote:
    > It could be your Application Pool settings.
    >
    > If you are running in IIS6 mode, your web sites will be using Application
    > Pools. If your app pools are set to run using multiple processes, then cache
    > & session information will be inconsistently accessible to aspx pages. Check
    > the number of processes for your IIS 6 app pool. If it's 1, then that's the
    > cause. Or if different virtual dirs on your site have different pools, that
    > could also cause the results you see.
    >
    >
    > --Peter
    > --
    > Co-founder, Eggheadcafe.com developer portal:
    > http://www.eggheadcafe.com
    > UnBlog:
    > http://petesbloggerama.blogspot.com
    >
    >
    >
    >
    > "" wrote:
    >
    > > All-
    > >
    > > I have a Framework 2.0 application running under Windows 2003 Server
    > > and IIS utilizing the default application pool.
    > >
    > > On my development machine (XP w/ IIS 5.1) the code runs perfectly. But
    > > when deployed recompiled under 2003/6.0, every time the application
    > > gets to a Response.Redirect (happens right away when a user logs in),
    > > the Session data is lost.
    > >
    > > What I have investigated is this:
    > > 1. The application is not restarting
    > > 2. We've already deleted and recreated the virtual folder and
    > > application
    > > 3. No wierd permission issues that I can see
    > >
    > > I've seen lots of posts suggesting using Server.Transfer, but
    > > Response.Redirect works fine under development. This is wierd. Any help
    > > is appreciated.
    > >
    > > -David
    > >
    > >
    , Jun 6, 2006
    #3
    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. Jon Paugh
    Replies:
    1
    Views:
    3,856
    Jon Paugh
    Nov 30, 2004
  2. GreggTB
    Replies:
    10
    Views:
    4,262
    Damien
    May 24, 2005
  3. Sal
    Replies:
    1
    Views:
    399
  4. Alex
    Replies:
    2
    Views:
    137
    Guest
    Oct 20, 2003
  5. Dornel
    Replies:
    0
    Views:
    156
    Dornel
    Jun 14, 2006
Loading...

Share This Page