Also see this SO question: How does the session state work in MVC 2.0?
That answer contains a nice code sample such as the following about accesssing per-user session state from a controller class.
// from example
if (Session["QuestionAnswers"] != null)
{
return (List<QuestionAnswer>)Session["QuestionAnswers"];
}
You can use regular ASP.NET Session state to store a complex object for a particular user.
You can store anything in session state, including your "complex object" value.
MSDN Session State quote:
ASP.NET session state enables you to
store and retrieve values for a user
as the user navigates the different
ASP.NET pages that make up a Web
application
The following quotes from Scott Guthrie (a Corporate Vice President in the Microsoft Developer Division) support it use of regular session state in MVC:
Scottgu Quotes about MVC & Session State support:
Non-UI features in ASP.NET today like
Forms Authentication, Windows
Authentication, Membership, Roles, Url
Authorization, Caching, Session State,
Profiles, Health Monitoring,
Configuration, Compilation,
Localization, and
HttpModules/HttpHandlers all fully
support the MVC model.
-- http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx
Although the way you structure
application flow will be different, I
think you'll be pleasantly surprised
by the amount of knowledge overlap
that exists. Authentication,
Authorization, Caching, Configuration,
Compilation, Session State, Profile
Management, Health Monitoring,
Administration, Deployment, and many,
many other things are exactly the
same. MVC views are also .aspx pages
(that use .ascx user controls and
.master files). So the concept re-use
is quite heavy there as well.
-- http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx