public ActionResult Index() { var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext); using (var clientContext = spContext.CreateUserClientContextForSPHost()) { if (clientContext != null) { ViewBag.SiteName = _cache.GetFromCache <string>("SiteTitle", () => { return(GetSiteTitle(clientContext)); }); } } return(View()); }