ASP.NET Timeout

Discussion in 'General troubleshooting' started by wellpointvi, Oct 19, 2010.

  1. We were getting sporadic ASP.NET timeouts and were advised by DiscountASP support team to switch from InProc sessions to SQL Server sessions.

    This was done in two parts:

    1. DiscountASP support team installed SQL Server Session State on our database;
    2. We changed our web.config and added <sessionState mode="SQLServer" …>

    Now we are getting the following error:

    Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.
     
  2. Hi,
    I'll do my best to help with this but it may take a few changes/tests on your end.
    First of all, make sure the sessionState settings are within system.web

    As a note, are you running IIS7 in Integrated mode?

    Next, your SQL Server connection is correct? Connections area of web.config
    Test it from Visual Studio to be sure.

    Finally does your web.config sessionState look like this?

    <sessionState allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="Server=sql.discountasp.net;Database=SQL2008_sessionstate;User ID=SQL2008_sessionstate_user;Password=YourPasswordHere" timeout="15" />
     
  3. TO ANSWER YOUR QUESTIONS:

    Make sure the sessionState settings are within system.web.
    YES

    Are you running IIS7 in Integrated mode?
    THAT WOULD BE DONE BY MY HOST DISCOUNTASP.NET, SO I ASSUME THE ANSWER IS YES.

    Is your SQL Server connection correct? Connections area of web.config
    Test it from Visual Studio to be sure.
    YES

    Finally, does your web.config sessionState look like this?

    <sessionState allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="Server=sql.discountasp.net;Da tabase=SQL2008_sessionstate;User ID=SQL2008_sessionstate_user;Password=YourPassword Here" timeout="15" />

    ALMOST:
    - I’M NOT USING A SEPARATE DB FOR sessionstate; I’M POINTING TO THE APPLICATION’S DB
    - I ALSO HAVE cookieless="false"; SHOULD I CHANGE IT TO: cookieless="true"?
     
  4. ...This may be more complex than I first thought, just did some on-line searches.
    From what I read just now you should be using cookieless="false"

    Is there a page generating this that uses Class objects?
    I found some KB support articles on Microsoft's social sites with some help with that when this error comes up.
     
  5. What is the link to KB support articles on Microsoft's social sites with some help with that when this error comes up?
     

Share This Page