Non-Serializable and MarshalByRef Objects
Posted on 2004-03-26
I'm working in an environment where Serialization is used. While I basically understand why one would use Serialization, I don't really understand the programming specifics behind it. I occasionally receive the following error as I build my pages, and don't understand what parts of my code cause it:
"Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'."
These errors SEEM to be related to my use of Session vatiables -- though I'm really not sure.
Does anyone out there have any idea of general guidelines to follow when programming in an environment where Serialization is used in order to avoid such errors. Perhaps a link to an article?