コード例 #1
0
ファイル: ErrorController.cs プロジェクト: hiroakit/blog
        public ActionResult NotFound()
        {
            HNKBlogConfigManager cfgMgr = null;
            try
            {
                cfgMgr = new HNKBlogConfigManager(AppSettings.GetDbConnectionString());
            }
            catch (Exception e)
            {
                AzureLog.WriteToTable(e);
                return new HttpStatusCodeResult(500);
            }

            VMError model = new VMError("NotFound");
            model.SetPageTitle("お探しのページは見つかりませんでした", cfgMgr.BlogTitle.Value);
            return View(model);
        }
コード例 #2
0
ファイル: ErrorController.cs プロジェクト: hiroakit/blog
        public ActionResult Index()
        {
            HNKBlogConfigManager cfgMgr = null;
            try
            {
                cfgMgr = new HNKBlogConfigManager(AppSettings.GetDbConnectionString());
            }
            catch (Exception e)
            {
                AzureLog.WriteToTable(e);
                return new HttpStatusCodeResult(500);
            }

            VMError model = new VMError("Internal Server Error");
            model.SetPageTitle("エラーが発生しました", cfgMgr.BlogTitle.Value);
            return View(model);
        }