Can subdomains be controlled programmatically in an ASP.Net application?

I have an application that needs to be written in ASP.Net 3.5 that needs to manage subdomains for another website. The management website and the controlled website are hosted on different Windows servers, but both run IIS 6.0.

The management website should provide a user interface that can add or remove subdomains on the monitored site, so that requests for these subdomains (i.e. mysubdomain.controlledsite.com and thatothersubdomain.controlledsite.com) go to different sections of the monitored sites of the web application ( or, if necessary, install all this for different web applications, which then also have to be created or removed programmatically).

Where to begin? Is it possible? I saw some other questions ( Is it possible to make an ASP.Net MVC route based on a subdomain? ) Something about routes, but I don't if it fits my situation or not (I don't use MVC). I can change the code both on the management website and on the controlled website, so if there is a program for doing this work on both sides, I can do it.

To be specific, if the code remains the same as on the monitored site (I can change it if necessary), I need to receive requests such as http://xxxx.mysite.com/ and correlate this with http: // www. mysite.com/Home/xxxx/ by storing the URL that the client sees as the first.

+3
2

, asp.net MVC, URL-. . RouteBase . , , , .

- ... . , , . SQL . . CRUD , , - , .

global.asax () .

0

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


All Articles