完善系统设置,增加404页面

This commit is contained in:
2018-04-18 00:27:37 +08:00
parent ef947bf890
commit 309b696266
7 changed files with 524 additions and 0 deletions
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
namespace COMCMS.Web.Controllers
{
public class StatusCodeController : Controller
{
[HttpGet("/StatusCode/{statusCode}")]
public IActionResult Index(int statusCode)
{
var reExecute = HttpContext.Features.Get<IStatusCodeReExecuteFeature>();
NewLife.Log.XTrace.WriteLine($"Unexpected Status Code: {statusCode}, OriginalPath: {reExecute.OriginalPath}");
ViewBag.url = "";
return View(statusCode);
}
}
}