Thursday, 19 September 2013

Unable to serialize the session state?

Unable to serialize the session state?

We have reasonably large scale application and recently experiencing
issues with random logouts. Upon investigation we've found app pool is
recycling after physical memory limit of (1GB)is reached. I m now trying
to save session state in out of process as below
<sessionState mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false"
timeout="20"/>
After changing the session state mode to "StateServer" and running the
asp.net state service on server. I m getting the following error message
"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."
Apparently i have to mark session related objects with [Serializable]
attribute but the application is quite big. Is there a way around this
issue?
thanks

No comments:

Post a Comment