From: joinsang Date: Sat, 23 Feb 2019 17:26:17 +0000 (+0900) Subject: 미들웨어과 파이프라인, 레이아웃 메타태그 수정 X-Git-Url: https://git.insang.kr/gitweb/?a=commitdiff_plain;h=6b0b30f6bcfde3d10bad3aebaf2413b419c22983;p=ZipProject.git 미들웨어과 파이프라인, 레이아웃 메타태그 수정 메타태그 description, author, keywords 및 og 태그들 작성, 웹 타이틀 변경 --- diff --git a/ZipProject/Controllers/WebZipController.cs b/ZipProject/Controllers/WebZipController.cs index 8f066f8..e0070ca 100644 --- a/ZipProject/Controllers/WebZipController.cs +++ b/ZipProject/Controllers/WebZipController.cs @@ -1,4 +1,5 @@ -using System; +using System.Diagnostics; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -31,12 +32,6 @@ namespace ZipProject.Controllers { return View (); } - // Request files - public IActionResult ProcessingFiles () { - - return null; - } - public IActionResult En () { session.SetString ("lang", "en"); return Redirect ("/"); @@ -56,6 +51,11 @@ namespace ZipProject.Controllers { return File(zip.ToArray(), "application/zip"); } + + public ActionResult Error(){ + return View(new ErrorViewModel + { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } } } \ No newline at end of file diff --git a/ZipProject/Startup.cs b/ZipProject/Startup.cs index 846ab04..d920aaa 100644 --- a/ZipProject/Startup.cs +++ b/ZipProject/Startup.cs @@ -44,7 +44,6 @@ namespace ZipProject } else { - app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } @@ -52,6 +51,7 @@ namespace ZipProject app.UseStaticFiles(); app.UseCookiePolicy(); app.UseSession(); + app.UseStatusCodePages("text/plain", "status code page, status code: {0}"); app.UseMvc(routes => { diff --git a/ZipProject/Views/Shared/_Layout.cshtml b/ZipProject/Views/Shared/_Layout.cshtml index 83413d5..4aaacc9 100644 --- a/ZipProject/Views/Shared/_Layout.cshtml +++ b/ZipProject/Views/Shared/_Layout.cshtml @@ -3,6 +3,13 @@ + + + + + + + @ViewData["Title"] diff --git a/ZipProject/Views/WebZip/Index.cshtml b/ZipProject/Views/WebZip/Index.cshtml index 87233bd..cc15b29 100644 --- a/ZipProject/Views/WebZip/Index.cshtml +++ b/ZipProject/Views/WebZip/Index.cshtml @@ -2,7 +2,7 @@ For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 *@ @{ - ViewData["Title"] = "WebZip"; + ViewData["Title"] = "NiceZip: Easily file compression!"; string lang = (string)ViewData["lang"]; }