serialize all type of objects to store session in state server or sql server

694 Views Asked by At

I have a web application with ASP.NET web forms and I want to store session in state server or SQL server , in those cases my classes must be serialized, but I have some non-serializable fields or class (like IIdentity). what’s the best way to do this?

I tried ISurrogateSelector interface and implement two method (GetObjectData,SetOPbjectData) and it works but may exist too many non-serilizable objects and I want a general way to do this.

0

There are 0 best solutions below