I am trying to use CookieTempDataProvider to transfer the main message between a message (entity) and get (list of entities) using the RedirectToAction method. Using the standard TempData implementation, this works great, however, when I use the cookie-based version from the MVC Futures project, the TempData dictionary is empty after the redirect. This is because TempDataDictionary is returned as null from the DeserializeTempData method. I know for sure in which line of code the problem occurs, and I know how to fix it, but I cannot believe that I am the only one who has this problem.
I may be using the wrong version of the MVC Futures project, but I just downloaded the ASP.NET MVC v1.0 source and the problem definitely exists. Does anyone else use CookieTempDataProvider and does it work for you?
The problem with the CookieTempDataProvider class, as I see it, is on line 62, where it distinguishes the deserialized object as TempDataDictionary, and not as IDictionary <string, object>. When I make this change, everything works fine.
Does anyone else see this problem, or is it just me?
cookies asp.net-mvc asp.net-mvc-futures
jimr
source share