From 15c0bf6154b51223f0d40a374e18f40bc8518bc1 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Fri, 11 Nov 2016 21:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Exception=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=96=87=E4=BB=B6View?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Bootstrap.Admin.csproj | 8 ++++++++ Bootstrap.Admin/Controllers/AdminController.cs | 12 ++++++++++++ Bootstrap.Admin/Views/Admin/Excep.cshtml | 5 +++++ 3 files changed, 25 insertions(+) create mode 100644 Bootstrap.Admin/Views/Admin/Excep.cshtml diff --git a/Bootstrap.Admin/Bootstrap.Admin.csproj b/Bootstrap.Admin/Bootstrap.Admin.csproj index dba3d696..ee144f64 100644 --- a/Bootstrap.Admin/Bootstrap.Admin.csproj +++ b/Bootstrap.Admin/Bootstrap.Admin.csproj @@ -124,6 +124,13 @@ + + + + + + + @@ -281,6 +288,7 @@ + Web.config diff --git a/Bootstrap.Admin/Controllers/AdminController.cs b/Bootstrap.Admin/Controllers/AdminController.cs index c25033c1..35e7f268 100644 --- a/Bootstrap.Admin/Controllers/AdminController.cs +++ b/Bootstrap.Admin/Controllers/AdminController.cs @@ -109,5 +109,17 @@ namespace Bootstrap.Admin.Controllers var v = new NavigatorBarModel("~/Admin/Infos"); return View(v); } + /// + /// + /// + /// + public ActionResult Excep() + { + using (System.IO.StreamReader reader = new System.IO.StreamReader(Server.MapPath("~/App_Data/ErrorLog/Error2016-11-11.log"))) + { + ViewBag.Content = new MvcHtmlString(reader.ReadToEnd().Replace("\r\n", "
")); + } + return View(); + } } } diff --git a/Bootstrap.Admin/Views/Admin/Excep.cshtml b/Bootstrap.Admin/Views/Admin/Excep.cshtml new file mode 100644 index 00000000..f58e7783 --- /dev/null +++ b/Bootstrap.Admin/Views/Admin/Excep.cshtml @@ -0,0 +1,5 @@ +@{ + ViewBag.Title = "Excep"; + Layout = "~/Views/Shared/_Layout.cshtml"; +} +
@ViewBag.Content
\ No newline at end of file