diff options
Diffstat (limited to 'TwoStepsAuthenticator.TestWebsite/App_Start')
3 files changed, 55 insertions, 0 deletions
diff --git a/TwoStepsAuthenticator.TestWebsite/App_Start/FilterConfig.cs b/TwoStepsAuthenticator.TestWebsite/App_Start/FilterConfig.cs new file mode 100644 index 0000000..20a3374 --- /dev/null +++ b/TwoStepsAuthenticator.TestWebsite/App_Start/FilterConfig.cs @@ -0,0 +1,13 @@ +using System.Web; +using System.Web.Mvc; + +namespace TwoStepsAuthenticator.TestWebsite +{ + public class FilterConfig + { + public static void RegisterGlobalFilters(GlobalFilterCollection filters) + { + filters.Add(new HandleErrorAttribute()); + } + } +}
\ No newline at end of file diff --git a/TwoStepsAuthenticator.TestWebsite/App_Start/RouteConfig.cs b/TwoStepsAuthenticator.TestWebsite/App_Start/RouteConfig.cs new file mode 100644 index 0000000..cdacdd2 --- /dev/null +++ b/TwoStepsAuthenticator.TestWebsite/App_Start/RouteConfig.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Routing; + +namespace TwoStepsAuthenticator.TestWebsite +{ + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) + { + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); + } + } +}
\ No newline at end of file diff --git a/TwoStepsAuthenticator.TestWebsite/App_Start/WebApiConfig.cs b/TwoStepsAuthenticator.TestWebsite/App_Start/WebApiConfig.cs new file mode 100644 index 0000000..1ff1be7 --- /dev/null +++ b/TwoStepsAuthenticator.TestWebsite/App_Start/WebApiConfig.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Http; + +namespace TwoStepsAuthenticator.TestWebsite +{ + public static class WebApiConfig + { + public static void Register(HttpConfiguration config) + { + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + } + } +} |