public SessionState LoadSessionState(IManosContext ctx)
{
// Get the session cookie
var id = (string)ctx.Request.Cookies.Get(cookie);
SessionState state = null;
// New session?
if (id==null || !m_ActiveSessions.TryGetValue(id, out state))
{
// Allocate a new session
id = Guid.NewGuid().ToString();
state = new SessionState(id, 30*60*1000, new Dictionary<string, object>());
SetCookie(ctx, state);
return state;
}
// Return a copy
return state.Clone();
}