ASP.NET login for subdomain from parent domain

I have an ASP.Net MVC site that has a subdomain for each client, for example. customer1.site.com, customer2.site.com, etc.

Login works fine with customer1.site.com/login and customer2.site.com/login using standard ASP.Net FormsAuthentication.

How can I log in from the parent domain (e.g. site.com/login) where the user specifies the name of the subdomain in the form field? I would like the auth cookie to be stored on client1.site.com or customer2.site.com, so obviously, you need to redirect and rewrite the login form somehow.

+3
source share
2 answers

, . (, customer1) , (, customer1.site.com/login).

+1

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


All Articles