The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RouteConfig.cs 725B

1234567891011121314151617181920212223
  1. using System.Web.Mvc;
  2. using System.Web.Routing;
  3. namespace Teknik
  4. {
  5. public class RouteConfig
  6. {
  7. public static void RegisterRoutes(RouteCollection routes)
  8. {
  9. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  10. // Add this code to handle non-existing urls
  11. routes.MapRoute(
  12. name: "404-PageNotFound",
  13. // This will handle any non-existing urls
  14. url: "{*url}",
  15. // "Shared" is the name of your error controller, and "Error" is the action/page
  16. // that handles all your custom errors
  17. defaults: new { controller = "Default", action = "NotFound" }
  18. );
  19. }
  20. }
  21. }