protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); UserState userState = new UserState(); if (User is ClaimsPrincipal) { var user = User as ClaimsPrincipal; var claims = user.Claims.ToList(); var userStateString = GetClaim(claims, "UserState"); if (!string.IsNullOrEmpty(userStateString)) { userState.FromString(userStateString); Session["UserState"] = userState; } } }