I recently learned that TempData for MVC is backed by Sessions by default, which is a terrible idea if one ever intends to have a web farm...
I attempted to implement Brock Allen's Cookie based TempData provider, however, The ViewData object itself is not marked Seriablizable, and as such, cannot be stored in the Cookie Based provider (or Session State Service, etc etc...)
Type 'System.Web.Mvc.ViewDataDictionary' in Assembly 'System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.
BrockAllen.CookieTempData.CookieTempDataProvider.SaveTempData(ControllerContext controllerContext, IDictionary`2 values) in c:\ballen\github\CookieTempData\45\BrockAllen.CookieTempData\CookieTempDataProvider.cs:31
System.Web.Mvc.TempDataDictionary.Save(ControllerContext controllerContext, ITempDataProvider tempDataProvider) +154
How do I get around this?!
Update:
Perhaps a batter way to ask this would be: how do I send ViewData to another Controller method (PRG: Post, Redirect, Get paradigm) WITHOUT needing TempData (and therefore Sessions)?