34 changed files with 637 additions and 180 deletions
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
using System.Web.Mvc; |
||||
|
||||
namespace Teknik.Areas.About |
||||
{ |
||||
public class AboutAreaRegistration : AreaRegistration |
||||
{ |
||||
public override string AreaName |
||||
{ |
||||
get |
||||
{ |
||||
return "About"; |
||||
} |
||||
} |
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context) |
||||
{ |
||||
context.MapSubdomainRoute( |
||||
"About_default", // Route name
|
||||
"about", |
||||
"{controller}/{action}", // URL with parameters
|
||||
new { area = this.AreaName, controller = "About", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
|
||||
); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Web; |
||||
using System.Web.Mvc; |
||||
using Teknik.Controllers; |
||||
|
||||
namespace Teknik.Areas.About.Controllers |
||||
{ |
||||
public class AboutController : DefaultController |
||||
{ |
||||
[AllowAnonymous] |
||||
// GET: About/About
|
||||
public ActionResult Index() |
||||
{ |
||||
ViewBag.Title = Config.Title + " - About"; |
||||
ViewBag.Message = "Your application description page."; |
||||
|
||||
return View(Config); |
||||
} |
||||
} |
||||
} |
@ -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,44 @@
@@ -0,0 +1,44 @@
|
||||
using System.Web.Mvc; |
||||
|
||||
namespace Teknik.Areas.Blog |
||||
{ |
||||
public class BlogAreaRegistration : AreaRegistration |
||||
{ |
||||
public override string AreaName |
||||
{ |
||||
get |
||||
{ |
||||
return "Blog"; |
||||
} |
||||
} |
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context) |
||||
{ |
||||
//context.MapSubdomainRoute(
|
||||
// "Blog_dev", // Route name
|
||||
// "dev",
|
||||
// "blog/{controller}/{action}/{username}/{page}", // URL with parameters
|
||||
// new { subdomain = "blog", area = this.AreaName, controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
|
||||
// );
|
||||
context.MapSubdomainRoute( |
||||
"Blog_default", // Route name
|
||||
"blog", |
||||
"{controller}/{action}/{username}/{page}", // URL with parameters
|
||||
new { area = this.AreaName, controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional } // Parameter defaults
|
||||
); |
||||
//context.Routes.MapSubDomainRoute(
|
||||
// "Blog_default", // Route name
|
||||
// "blog", // Domain with parameters
|
||||
// "{controller}/{action}", // URL with parameters
|
||||
// new { controller = "Blog", action = "Index" }, // Parameter defaults
|
||||
// new[] { typeof(Controllers.BlogController).Namespace }
|
||||
// );
|
||||
//context.MapRoute(
|
||||
// "Blog_default",
|
||||
// "{subdomain}/{controller}/{action}/{username}/{page}",
|
||||
// new { subdomain = "blog", controller = "Blog", action = "Index", username = UrlParameter.Optional, page = UrlParameter.Optional },
|
||||
// namespaces: new[] { "Teknik.Areas.Blog.Controllers" }
|
||||
//);
|
||||
} |
||||
} |
||||
} |
@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
|
||||
|
||||
Test Blog |
@ -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,20 @@
@@ -0,0 +1,20 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Web; |
||||
using System.Web.Mvc; |
||||
using Teknik.Controllers; |
||||
|
||||
namespace Teknik.Areas.Dev.Controllers |
||||
{ |
||||
public class DevController : DefaultController |
||||
{ |
||||
[AllowAnonymous] |
||||
// GET: Dev
|
||||
public ActionResult Index() |
||||
{ |
||||
ViewBag.Title = Config.Title + " - Development"; |
||||
return View("~/Areas/Dev/Views/Dev/Index.cshtml"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
using System.Web.Mvc; |
||||
|
||||
namespace Teknik.Areas.Dev |
||||
{ |
||||
public class DevAreaRegistration : AreaRegistration |
||||
{ |
||||
public override string AreaName |
||||
{ |
||||
get |
||||
{ |
||||
return "Dev"; |
||||
} |
||||
} |
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context) |
||||
{ |
||||
//Config config = Config.Load();
|
||||
context.MapSubdomainRoute( |
||||
"Dev_subdomain", // Route name
|
||||
"dev", |
||||
"{area}/{controller}/{action}", // URL with parameters
|
||||
new { area = "Home", controller = "Home", action = "Index" } // Parameter defaults
|
||||
); |
||||
//context.MapRoute(
|
||||
// "Dev_default",
|
||||
// "Dev/{controller}/{action}",
|
||||
// new { controller = "Dev", action = "Index" },
|
||||
// namespaces: new[] { "Teknik.Areas.Dev.Controllers" }
|
||||
//);
|
||||
} |
||||
} |
||||
} |
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
|
||||
Testing Dev |
||||
|
||||
@Html.ActionLink("Main Area", "Index", "Blog", new { area = "Blog" }, null) |
@ -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,38 @@
@@ -0,0 +1,38 @@
|
||||
using System.Web.Mvc; |
||||
using Teknik; |
||||
|
||||
namespace Teknik.Areas.Home |
||||
{ |
||||
public class HomeAreaRegistration : AreaRegistration |
||||
{ |
||||
public override string AreaName |
||||
{ |
||||
get |
||||
{ |
||||
return "Home"; |
||||
} |
||||
} |
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context) |
||||
{ |
||||
context.MapSubdomainRoute( |
||||
"Home_dev", // Route name
|
||||
"www", |
||||
"{controller}/{action}", // URL with parameters
|
||||
new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults
|
||||
); |
||||
context.MapSubdomainRoute( |
||||
"Home_subdomain", // Route name
|
||||
null, |
||||
"{controller}/{action}", // URL with parameters
|
||||
new { area = this.AreaName, controller = "Home", action = "Index" } // Parameter defaults
|
||||
); |
||||
//context.MapRoute(
|
||||
// "Home_default",
|
||||
// "{controller}/{action}",
|
||||
// new { area = "Home", controller = "Home", action = "Index" },
|
||||
// namespaces: new[] { "Teknik.Areas.Home.Controllers" }
|
||||
//);
|
||||
} |
||||
} |
||||
} |
@ -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> |
@ -1,13 +0,0 @@
@@ -1,13 +0,0 @@
|
||||
using Microsoft.Owin; |
||||
using Owin; |
||||
|
||||
[assembly: OwinStartupAttribute(typeof(Teknik.Startup))] |
||||
namespace Teknik |
||||
{ |
||||
public partial class Startup |
||||
{ |
||||
public void Configuration(IAppBuilder app) |
||||
{ |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<!-- |
||||
For more information on how to configure your ASP.NET application, please visit |
||||
http://go.microsoft.com/fwlink/?LinkId=301880 |
||||
--> |
||||
<configuration> |
||||
<configSections> |
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> |
||||
|
||||
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> |
||||
<connectionStrings configSource="ConnectionStrings.config" /> |
||||
<!-- Create ConnectionStrings.config and add your connection string--> |
||||
<appSettings> |
||||
<add key="webpages:Version" value="3.0.0.0" /> |
||||
<add key="webpages:Enabled" value="false" /> |
||||
<add key="ClientValidationEnabled" value="true" /> |
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> |
||||
</appSettings> |
||||
<!-- |
||||
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367. |
||||
|
||||
The following attributes can be set on the <httpRuntime> tag. |
||||
<system.Web> |
||||
<httpRuntime targetFramework="4.5.2" /> |
||||
</system.Web> |
||||
--> |
||||
<system.web> |
||||
<customErrors mode="Off" /> |
||||
<authentication mode="Forms" /> |
||||
<compilation debug="true" targetFramework="4.5.2" /> |
||||
<httpRuntime targetFramework="4.5.2" /> |
||||
</system.web> |
||||
<system.webServer> |
||||
<modules> |
||||
<remove name="FormsAuthentication" /> |
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" /> |
||||
</modules> |
||||
</system.webServer> |
||||
<runtime> |
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> |
||||
</dependentAssembly> |
||||
<dependentAssembly> |
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> |
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> |
||||
</dependentAssembly> |
||||
</assemblyBinding> |
||||
</runtime> |
||||
<entityFramework> |
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> |
||||
<parameters> |
||||
<parameter value="mssqllocaldb" /> |
||||
</parameters> |
||||
</defaultConnectionFactory> |
||||
<providers> |
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> |
||||
</providers> |
||||
</entityFramework> |
||||
</configuration> |
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
||||
<footer id="footer" class="footer navbar navbar-default"> |
||||
<div class="container"> |
||||
<p class="text-muted">© Teknik 2013-2015 | @Html.ActionLink("Privacy", "Index", "Privacy", routeValues: null, htmlAttributes: new { title = "Privacy" }) | @Html.ActionLink("Transparency", "Index", "Transparency", routeValues: null, htmlAttributes: new { title = "Transparency" }) | @Html.ActionLink("Server", "Index", "Server", routeValues: null, htmlAttributes: new { title = "Server" })</p> |
||||
<p class="text-muted">© Teknik 2013-2015 | @Html.ActionLink("Privacy", "Index", "Privacy", new { area = "Privacy"}, htmlAttributes: new { title = "Privacy" }) | @Html.ActionLink("Transparency", "Index", "Transparency", new { area = "Transparency" }, htmlAttributes: new { title = "Transparency" }) | @Html.ActionLink("Server", "Index", "Server", new { area = "Server" }, htmlAttributes: new { title = "Server" })</p> |
||||
</div> |
||||
</footer> |
||||
|
Loading…
Reference in new issue