Article ID: 312112 - Last Review: August 3, 2003 - Revision: 3.2 BUG: Session Data Is Not Saved in Out-of-Process Session StateThis article was previously published under Q312112 SYMPTOMS When you use SQLServer session state mode, if you try to store an instance of a class
that is not marked as serializable into a session variable, the request returns
without an error. However, ASP.NET actually fails to save the session data and
blocks subsequent requests in the same session. This same behavior occurs when you use StateServer session state mode, but you also receive the following run-time error: Description: An unhandled exception occurred
during the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the code.
Exception Details: System.Runtime.Serialization.SerializationException: The type <namespace.classname> in Assembly <AssemblyName>, Version=1.0.676.30211, Culture=neutral, PublicKeyToken=null is not marked as serializable. CAUSE This problem occurs because the class is not marked as
serializable. RESOLUTION To resolve this problem, add the [Serializable] attribute to mark the class as serializable. For example, use the
following Microsoft Visual C# .NET code: STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was fixed in ASP.NET (included with the .NET Framework) 1.1. | Article Translations
|


Back to the top
