public ActionResult Index(ApplicationPushNotificationSetting settings, string siteRootUrl)
        {
            var dbSetting = NoteContext.TicketDeskPushNotificationSettings;

            if (ModelState.IsValid && TryUpdateModel(dbSetting))
            {
                NoteContext.SaveChanges();
                DomainContext.TicketDeskSettings.ClientSettings.Settings["DefaultSiteRootUrl"] = siteRootUrl.TrimEnd('/');
                DomainContext.SaveChanges();
            }
            ViewBag.CurrentRootUrl = GetCurrentRootUrl();
            ViewBag.SiteRootUrl    = GetRootUrlSetting();
            return(View(dbSetting));
        }
        public ActionResult Index(ApplicationPushNotificationSetting settings, string siteRootUrl)
        {
            var dbSetting = NoteContext.TicketDeskPushNotificationSettings;

            if (ModelState.IsValid && TryUpdateModel(dbSetting))
            {
                NoteContext.SaveChanges();
                DomainContext.TicketDeskSettings.ClientSettings.Settings["DefaultSiteRootUrl"] = siteRootUrl.TrimEnd('/');
                DomainContext.SaveChanges();
                ViewBag.Saved = true;
            }
            ViewBag.CurrentRootUrl = GetCurrentRootUrl();
            ViewBag.SiteRootUrl    = GetRootUrlSetting();

            Task.Delay(500).ContinueWith(t => System.Web.HttpRuntime.UnloadAppDomain()).ConfigureAwait(false);

            return(View(dbSetting));
        }