serialization and Session Object

B

Bilbo

Hello,

I recently read that a class must support serialization in order for it to
be stored in the Session State. Before reading this I had been storing a
class to the Session State no problem (without serialization). The class is
simply a storage class and contains only primitive types....is it necessary
to serialize this object? If so, how do you go about serializing an entire
class?

Thanks much.
 
M

Marina

It only needs to be serializable if you using session state other then
InProc. If you are using InProc, you can place anything you want into
session.
 
M

Marina

Check in your Web.config, that's where it is set. InProc is the default.

And if you haven't had any serialization warnings after putting custom
objects into session, then you're using InProc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top