Which types of the object can stored in the Session State?

It's depends on the session mode.

  • InProc mode : objects stored in session state are actually live objects, and so you can store whatever object you have created. 
  • State Server or SQL Server mode : objects in the session state will be serialized and deserialized when a request is processed.  So make sure your objects are serializable and their classes must be marked as so.  If not, the session state will not be saved successfully.

0 comments:

Post a Comment