Creating a subdomain for each user

How can I create a subdomain for each registered user of a website during registration?
For the scenario below ...

  • The user opens site.com/register.
  • Provides details and sends.
  • Directly redirected to newuser.site.com
  • User can work in newuser.site.com

I do not know how to solve the problems:

  • Creation and distribution of a subdomain for the user.
  • Ask one ASP.NET application to process all subdomains and the main domain.
  • IIS configuration.

Ideally, I would like to stay with the .NET Framework as much as possible.

+3
source share
2 answers

:

  • DNS (*) IP- . anystring.yourdomain.com.
  • IIS IP-, ( ). , HTTP- IP- .
  • HttpModule, ( HttpContext) , . cookie - , , .
+6

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


All Articles