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.
To enable sessions in the asp.net site you need to
include a pages attribute in web.config:
or enable SessionState in the Page directive in your page :
<%@ Page enableSessionState = "true" %>
Also, the System.Web.SessionStateModule should exist in your
httpModules section in the application configuration.
<add type="System.Web.SessionState.SessionStateModule" name="Session" />