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.

ProfileAreaRegistration.cs 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System.Web.Mvc;
  2. namespace Teknik.Areas.Profile
  3. {
  4. public class ProfileAreaRegistration : AreaRegistration
  5. {
  6. public override string AreaName
  7. {
  8. get
  9. {
  10. return "Profile";
  11. }
  12. }
  13. public override void RegisterArea(AreaRegistrationContext context)
  14. {
  15. context.MapSubdomainRoute(
  16. "Profile_dev_login", // Route name
  17. "dev",
  18. "Profile/Login", // URL with parameters
  19. new { controller = "Profile", action = "Login" }, // Parameter defaults
  20. new[] { typeof(Controllers.ProfileController).Namespace }
  21. );
  22. context.MapSubdomainRoute(
  23. "Profile_dev", // Route name
  24. "dev",
  25. "Profile/{username}", // URL with parameters
  26. new { controller = "Profile", action = "Index" }, // Parameter defaults
  27. new[] { typeof(Controllers.ProfileController).Namespace }
  28. );
  29. context.MapSubdomainRoute(
  30. "Profile_dev_unique", // Route name
  31. "dev",
  32. "Profile/{controller}/{action}", // URL with parameters
  33. new { controller = "Profile", action = "Index" }, // Parameter defaults
  34. new[] { typeof(Controllers.ProfileController).Namespace }
  35. );
  36. context.MapSubdomainRoute(
  37. "Profile_default", // Route name
  38. "profile",
  39. "{username}", // URL with parameters
  40. new { controller = "Profile", action = "Index", username = UrlParameter.Optional }, // Parameter defaults
  41. new[] { typeof(Controllers.ProfileController).Namespace }
  42. );
  43. context.MapSubdomainRoute(
  44. "Profile_default_login", // Route name
  45. "profile",
  46. "Login", // URL with parameters
  47. new { controller = "Profile", action = "Login" }, // Parameter defaults
  48. new[] { typeof(Controllers.ProfileController).Namespace }
  49. );
  50. context.MapSubdomainRoute(
  51. "Profile_default_unique", // Route name
  52. "profile",
  53. "{controller}/{action}", // URL with parameters
  54. new { controller = "Profile", action = "Index" }, // Parameter defaults
  55. new[] { typeof(Controllers.ProfileController).Namespace }
  56. );
  57. }
  58. }
  59. }