Previous Next

Thread: Problems when using Session State in an asp .net application

Last post 07-24-2008 8:25 AM by Zhao Ji Ma - MSFT. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-21-2008, 7:41 AM

    Problems when using Session State in an asp .net application

    Hey all.

    Not sure if this is a problem with asp.net or with IIS7, so I have written this to both forums for advice.

    Basically I want to know if I have missed something as I cant get this working properly.

    I have a website I am building which is getting tested on my local dedicated server. Every page I log onto I have the following code:

    'get session details if they exist, if not then create them
            If Session("cart") Is Nothing Then
                cart = New ArrayList()
                Session("cart") = cart
            Else
                cart = CType(Session("cart"), ArrayList)
            End If 

     

    So what this code does, is check for session state details, if they exist then use them, if not then create them. But when I run the website to test it in IIS7, it sometimes works, but then other times (very frequently) the session state will be empty and I will get a message as follows:

     

    Server Application Unavailable

    The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

    Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

     

     

     

    I cant seem to see any logs which show a problem! Any ideas why this would happen? This is the first time I have used session state in a program.

    asp .net developer
  • 07-24-2008, 8:25 AM In reply to

    Re: Problems when using Session State in an asp .net application

    Hi,

    This issue may occur if there are two versions of ASP.NET running in the same Internet Information Services (IIS) process. See if you have two versions of ASP.NET running in the same application pool?

    http://support.microsoft.com/kb/944558/en-us 

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
Page 1 of 1 (2 items)
Page view counter