public JsonResult CheckUserAccess(string privilegio) { HomeRepository Home = new HomeRepository(); try { return(Json(Home.CheckUserAccess((string)(Session["usuario"]), "SGRC", privilegio), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Home> list = new List <Home>(); Home obj = new Home(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }