public ActionResult LoadCollection() { if (!User.Identity.IsAuthenticated) { Response.StatusCode = 204; return(Json( new { result = "" }, JsonRequestBehavior.AllowGet )); } var userName = User.Identity.Name; var shapesManager = new ShapesManager(); var shapesCollection = shapesManager.LoadForUser(userName); shapesManager.Clear(); return(Json( new { result = shapesCollection }, JsonRequestBehavior.AllowGet )); }