diff --git a/.gitignore b/.gitignore index 70dc36a..f461738 100644 --- a/.gitignore +++ b/.gitignore @@ -187,4 +187,7 @@ FakesAssemblies/ # LightSwitch generated files GeneratedArtifacts/ _Pvt_Extensions/ -ModelManifest.xml \ No newline at end of file +ModelManifest.xml +/Teknik/ConnectionStrings.config +/Teknik/App_Data/Config.json +/.vs/config/applicationhost.config diff --git a/Teknik/Areas/Error/Controllers/ErrorController.cs b/Teknik/Areas/Error/Controllers/ErrorController.cs new file mode 100644 index 0000000..50ce1c0 --- /dev/null +++ b/Teknik/Areas/Error/Controllers/ErrorController.cs @@ -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(); + } + } +} \ No newline at end of file diff --git a/Teknik/Areas/Error/ErrorAreaRegistration.cs b/Teknik/Areas/Error/ErrorAreaRegistration.cs new file mode 100644 index 0000000..3af3d12 --- /dev/null +++ b/Teknik/Areas/Error/ErrorAreaRegistration.cs @@ -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 } + ); + } + } +} \ No newline at end of file diff --git a/Teknik/Areas/Error/ViewModels/ErrorViewModel.cs b/Teknik/Areas/Error/ViewModels/ErrorViewModel.cs new file mode 100644 index 0000000..08c0f24 --- /dev/null +++ b/Teknik/Areas/Error/ViewModels/ErrorViewModel.cs @@ -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 + { + } +} diff --git a/Teknik/Areas/Error/Views/Error/Http404.cshtml b/Teknik/Areas/Error/Views/Error/Http404.cshtml new file mode 100644 index 0000000..30077aa --- /dev/null +++ b/Teknik/Areas/Error/Views/Error/Http404.cshtml @@ -0,0 +1,21 @@ +@model Teknik.Areas.Error.ViewModels.ErrorViewModel + +