I have asp.net web site and trying to change from inproc to sql mode for the session. I put "serizlizable" attriubte in the user defined classes but I am getting the "Unable to serialize the session state" error page. It looks like I am referencing another classes in side of the user defined classes that are not marked as "serializable". I can't mark these classes as "Serializable" since I am only referencing by dll files.
How can i solve this problem?
How can i solve this problem?
By writing other custom classes yourself that you have control over and which you could mark with Serializable
and storing those custom classes into the session. As far as the mapping between the original classes and those new custom classes is concerned, AutoMapper could simplify it. That is to say, you cannot store a class into out-of-process session without it being marked as serializable.