Unable to serialize the session state

Giganews Newsgroups
Subject: Unable to serialize the session state
Posted by:  Jim Zhao (Jim0129@newsgroups.nospam)
Date: Tue, 5 Feb 2008

Hi there,

When I run my asp.net application, I get error "Unable to serialize the
session state. Please not that non-serializable objects or MarshalByRef
objects are not permitted when session state mode is 'StateServer' or
'SQLServer'."

I believe I got this error because I was trying to save a class object to a
session state.

* The class has a bunch of properties return string as well as a couple of
properties return ArrayList. I have [Serializable] in front of class
declaration. May be I'm wrong, but I thought all of these can be serialized.

* In web.config file, the session mode is ServerState.

Thank you in advance,
Jim

Replies