How to serve multiple domains with a single ASP.NET MVC application?

How to implement a mechanism (within a single ASP.NET MVC application) to:

  • if the request comes to mydomain (the user visits mydomain.com) → it processes a specific set of controllers
  • if the request arrives at otherdomain (the user visits otherdomain.com) → processes using a different set of controllers

(domains are similar to the same web hosting)

What extension points in ASP.NET MVC should be used to ensure that the described mechanism works?

+3
source share
2 answers

, IRouteConstraint, HttpContext ( ) . Global.asax , .

, , .

+1

2 -, DLL? - MVC.

0

Source: https://habr.com/ru/post/1755106/


All Articles