protected void Application_AuthorizeRequest() { if (User.Identity.IsAuthenticated) { string userGuidId = User.Identity.GetUserId(); BuildingsController bc = new BuildingsController(); bc.CheckForFinishedBuildings(userGuidId); bc.CheckForFinishedUnits(userGuidId); bc.UpdateResources(userGuidId); } }