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.

ErrorAreaRegistration.cs 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. namespace Teknik.Areas.Error
  4. {
  5. public class ErrorAreaRegistration : AreaRegistration
  6. {
  7. public override string AreaName
  8. {
  9. get
  10. {
  11. return "Error";
  12. }
  13. }
  14. public override void RegisterArea(AreaRegistrationContext context)
  15. {
  16. context.MapSubdomainRoute(
  17. "Error.Http404", // Route name
  18. new List<string>() { "*", "error" }, // Subdomains
  19. "404", // URL with parameters
  20. new { controller = "Error", action = "Http404" }, // Parameter defaults
  21. new[] { typeof(Controllers.ErrorController).Namespace }
  22. );
  23. context.MapSubdomainRoute(
  24. "Error.Http403", // Route name
  25. new List<string>() { "*", "error" }, // Subdomains
  26. "403", // URL with parameters
  27. new { controller = "Error", action = "Http403" }, // Parameter defaults
  28. new[] { typeof(Controllers.ErrorController).Namespace }
  29. );
  30. context.MapSubdomainRoute(
  31. "Error.Http500", // Route name
  32. new List<string>() { "*", "error" }, // Subdomains
  33. "500", // URL with parameters
  34. new { controller = "Error", action = "Http500" }, // Parameter defaults
  35. new[] { typeof(Controllers.ErrorController).Namespace }
  36. );
  37. }
  38. }
  39. }