增加Exception查看文件View

This commit is contained in:
Argo-Lenovo 2016-11-11 21:06:08 +08:00
parent 6e7f76e8bf
commit 15c0bf6154
3 changed files with 25 additions and 0 deletions

View File

@ -124,6 +124,13 @@
<Content Include="Content\html\RegResult.html" /> <Content Include="Content\html\RegResult.html" />
<Content Include="Content\images\bg.jpg" /> <Content Include="Content\images\bg.jpg" />
<Content Include="Content\images\lock-bg.jpg" /> <Content Include="Content\images\lock-bg.jpg" />
<Content Include="Content\images\logo.jpg" />
<Content Include="Content\images\logo1.jpg" />
<Content Include="Content\images\logo2.jpg" />
<Content Include="Content\images\logo3.jpg" />
<Content Include="Content\images\logo4.jpg" />
<Content Include="Content\images\logo5.jpg" />
<Content Include="Content\images\logo6.jpg" />
<Content Include="Content\js\bootstrap-datetimepicker.js" /> <Content Include="Content\js\bootstrap-datetimepicker.js" />
<Content Include="Content\js\bootstrap-select.js" /> <Content Include="Content\js\bootstrap-select.js" />
<Content Include="Content\js\bootstrap-select.min.js" /> <Content Include="Content\js\bootstrap-select.min.js" />
@ -281,6 +288,7 @@
<Content Include="Views\Home\Register.cshtml" /> <Content Include="Views\Home\Register.cshtml" />
<Content Include="Views\Admin\Notifications.cshtml" /> <Content Include="Views\Admin\Notifications.cshtml" />
<Content Include="Views\Admin\Infos.cshtml" /> <Content Include="Views\Admin\Infos.cshtml" />
<Content Include="Views\Admin\Excep.cshtml" />
<None Include="Web.Debug.config"> <None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</None> </None>

View File

@ -109,5 +109,17 @@ namespace Bootstrap.Admin.Controllers
var v = new NavigatorBarModel("~/Admin/Infos"); var v = new NavigatorBarModel("~/Admin/Infos");
return View(v); return View(v);
} }
/// <summary>
///
/// </summary>
/// <returns></returns>
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", "</br>"));
}
return View();
}
} }
} }

View File

@ -0,0 +1,5 @@
@{
ViewBag.Title = "Excep";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div>@ViewBag.Content</div>