Wednesday, June 1, 2011

Sharepoint 2010 and Session

Hello everybody,

It's a known thing that it's not that easy to start working with Sessions when developing custom webparts. It demands several modifications on server etc.

If you have jumped over that issue, you may face further ones about storing objects in Session.
One of the key elements here is being "Serializable" Even depending on your configuration, Sharepoint may allow you to use non-serialiazable classes in session or not.

But if you're facing "unknown error" in your session-using custom webpart, take a look at your session objects and be sure that all of them are serializable ones.

(You can define your all classes with [Serializable] attribute, by the way.)

No comments: