13 changed files with 187 additions and 15 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Web; |
||||
using System.Web.Mvc; |
||||
using Teknik.Controllers; |
||||
|
||||
namespace Teknik.Areas.Error.Controllers |
||||
{ |
||||
public class ErrorController : DefaultController |
||||
{ |
||||
// GET: Error/Error
|
||||
public ActionResult Index() |
||||
{ |
||||
return View(); |
||||
} |
||||
|
||||
public ActionResult Http404() |
||||
{ |
||||
return View(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
using System.Web.Mvc; |
||||
|
||||
namespace Teknik.Areas.Error |
||||
{ |
||||
public class ErrorAreaRegistration : AreaRegistration |
||||
{ |
||||
public override string AreaName |
||||
{ |
||||
get |
||||
{ |
||||
return "Error"; |
||||
} |
||||
} |
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context) |
||||
{ |
||||
context.MapRoute( |
||||
"404-PageNotFound", |
||||
"{*url}", |
||||
new { controller = "ErrorController", action = "Http404" }, // Parameter defaults
|
||||
new[] { typeof(Controllers.ErrorController).Namespace } |
||||
); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
using Teknik.ViewModels; |
||||
|
||||
namespace Teknik.Areas.Error.ViewModels |
||||
{ |
||||
public class ErrorViewModel : ViewModelBase |
||||
{ |
||||
} |
||||
} |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel |
||||
|
||||
<div class="container"> |
||||
<div class="row"> |
||||
<div class="col-md-12"> |
||||
<div class="error-template text-center"> |
||||
<h1>Oops!</h1> |
||||
<h2>404 Not Found</h2> |
||||
<div class="error-details"> |
||||
Sorry, an error has occured, Requested page not found! |
||||
</div> |
||||
<div class="error-actions"> |
||||
<a href="@Url.SubAction("www", "Index", "Home", new { area = "Home"})" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-home"></span> |
||||
Take Me Home |
||||
</a><a href="@Url.SubAction("contact", "Index", "Contact", new { area = "Contact"})" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-envelope"></span> Contact Support </a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
@{ |
||||
Layout = "~/Views/Shared/_Layout.cshtml"; |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?> |
||||
|
||||
<configuration> |
||||
<configSections> |
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> |
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> |
||||
</sectionGroup> |
||||
</configSections> |
||||
|
||||
<system.web.webPages.razor> |
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> |
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> |
||||
<namespaces> |
||||
<add namespace="System.Web.Mvc" /> |
||||
<add namespace="System.Web.Mvc.Ajax" /> |
||||
<add namespace="System.Web.Mvc.Html" /> |
||||
<add namespace="System.Web.Routing" /> |
||||
<add namespace="System.Web.Optimization" /> |
||||
<add namespace="Teknik" /> |
||||
|
||||
</namespaces> |
||||
</pages> |
||||
</system.web.webPages.razor> |
||||
|
||||
<appSettings> |
||||
<add key="webpages:Enabled" value="false" /> |
||||
</appSettings> |
||||
|
||||
<system.webServer> |
||||
<handlers> |
||||
<remove name="BlockViewHandler"/> |
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> |
||||
</handlers> |
||||
</system.webServer> |
||||
</configuration> |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
|
Loading…
Reference in new issue