locked
Session Object Lost in IIS 7.5 after upgraded from IIS 6 RRS feed

  • Question

  • User-1772086991 posted

    I have serveral systems which are developed with VS 2005, Dot Net Framework 2.0, with Ajax.

    I have, say, Session("mySetttings") = myObject.  The object may be a data table, array or just a string.

    The Systems work fine in IIS 6.  After migrate to IIS7.5 on windows 2008 r2 server.  I found that the Session only maintain for a few pages and then it is lost.  I have written some testing code and verfiy that the Session("mySettings") is nothing.

    I found that if I enable the 32-bit applications in the Appilcation Pool, then it works fine.  (Although I do not know the reason behind or I need to compile the system to 64 bit application but I have some 3rd party components which is 32 bit.)

    I am wondering how to fix this?  Since some of my clients are running on a shared hosting environment.  I may not able to ask the hosting company to enable the 32 bit applications in the Application Pool.

    Thanks.

    Alfred

    Friday, August 5, 2011 3:08 AM

Answers

All replies

  • User-1221795426 posted

    hi,

    try this

    put this code in web.config file

    <system.web>

             <sessionState timeout="45"></sessionState>

    </system.web>

    i hope it will help this...

    i extend session timeout as 45 minutes.

    Friday, August 5, 2011 2:48 PM
  • User-1772086991 posted

    Thanks.

    Actually I tried 30 minutes but no effect.  The session object lost within a few clicks. The only solution I can find out by trial and error is to set the 32 bit applications to enabled at the Application pool.

    Saturday, August 6, 2011 3:12 AM
  • User1943143334 posted

    Hi,

    I think your OS - Windows Server 2008 is 64-bit and hence the problem. "Enable 32-bit applications" is the solution for the problem.

    If you set that option, it is affected for that Applicaion Pool only. You can create different Application for other web applications.

    There is no problem with enabling that option. So you can go ahead and enable that option.

    Hope it helps u...

    Monday, August 8, 2011 1:40 AM
  • User-1772086991 posted

    Thanks.  Roopeshreddy.

    Yes.  The OS is Windows 2008 R2 64 bit.  Is "enable 32 bit applications" is the only solution? And is it an "official" solution?  I have tried to google and do not find an official KB towards the issue.

    Some of my clients are using their own server, and that is OK.  But some are using shared hosting service providers, which I have limited control towards the Application pool.

    For those clients who have their servers, I am now: create Another Application Pool and enable the "32 bit application".

     

    Monday, August 8, 2011 2:27 AM
  • User1943143334 posted

    Hi,

    Yeah, the option is provided for that purpose only. You can go ahead and use it.

    You can find some articles on the net if you bing properly.

    Check one of the blog post by Microsoft Engineer in a blog post

    http://blogs.msdn.com/b/rakkimk/archive/2007/11/03/iis7-running-32-bit-and-64-bit-asp-net-versions-at-the-same-time-on-different-worker-processes.aspx

    Hope it helps u... 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 8, 2011 8:49 AM
  • User-1772086991 posted

    Thanks. 

    Monday, August 8, 2011 10:49 AM