public ActionResult Index() { var cookies = Request.Cookies; var claims = ClaimsPrincipal.Current.Claims.ToList(); var claimsTextLength = claims.Sum(c => c.Type.Length + c.Value.Length); var appCookie = cookies["jumpingjacks"] ?? new HttpCookie("No App Cookie!", "I said nothing!"); var appCookieLength = appCookie.Value.Length; var model = new ProfilerIndexViewModel() { TotalClaimsLength = claimsTextLength, AppCookieLength = appCookieLength, CookiePerClaims = (float)(appCookieLength / (claimsTextLength + 0.001)), Cookies = cookies, Claims = claims, }; return View(model); }
public ActionResult Index() { var cookies = Request.Cookies; var claims = ClaimsPrincipal.Current.Claims.ToList(); var claimsTextLength = claims.Sum(c => c.Type.Length + c.Value.Length); var appCookie = cookies["jumpingjacks"] ?? new HttpCookie("No App Cookie!", "I said nothing!"); var appCookieLength = appCookie.Value.Length; var model = new ProfilerIndexViewModel() { TotalClaimsLength = claimsTextLength, AppCookieLength = appCookieLength, CookiePerClaims = (float)(appCookieLength / (claimsTextLength + 0.001)), Cookies = cookies, Claims = claims, }; return(View(model)); }