LINQ to SQL and SQL Server Session State – Unable to serialize the session state

Just realize one problem with LINQ to SQL

image

Unable to serialize the session state. In ‘StateServer’ and ‘SQLServer’ mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in ‘Custom’ mode.

When you have your ASP.NET session state stored in SQL Server, when you put any instance of your LINQ to SQL object into the session, you will hit by the about stated error.

I am still working on a fix for this. Will post the solution here once I found it.

Getting ready for MVP Summit

seattle

Flying off tonight to Seattle for MVP Summit. So stay tuned for more blog posts after I am back. People always tell me you’ll get motivated in MVP Summit besides knowing the latest stuff, so here I come.

On the mean time, some news I found out today about Microsoft going to release a cheap Windows Server SKU for cheap USD500 hardware. Good and exciting move in challenging times like now.  I do hope it will comes with .NET Framework installed. :) We need that to counter the LAMP stack.

http://www.microsoft-watch.com/content/corporate/foundation_server_is_foundation_for_what.html?kc=MWRSS02129TX1K0000535

But the news article also noted that Office 14 won’t out by 2010. I am not surprise given the lack of a beta build in the wild.