From 6b0b30f6bcfde3d10bad3aebaf2413b419c22983 Mon Sep 17 00:00:00 2001 From: joinsang Date: Sun, 24 Feb 2019 02:26:17 +0900 Subject: [PATCH] =?utf8?q?=EB=AF=B8=EB=93=A4=EC=9B=A8=EC=96=B4=EA=B3=BC=20?= =?utf8?q?=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC=EC=9D=B8,=20=EB=A0=88?= =?utf8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EB=A9=94=ED=83=80=ED=83=9C?= =?utf8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 메타태그 description, author, keywords 및 og 태그들 작성, 웹 타이틀 변경 --- ZipProject/Controllers/WebZipController.cs | 14 +++++++------- ZipProject/Startup.cs | 2 +- ZipProject/Views/Shared/_Layout.cshtml | 7 +++++++ ZipProject/Views/WebZip/Index.cshtml | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) 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"]; } -- 2.43.0