Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How do we set a tenant base in subdomain? #7631


User avatar
0
qualifyme created

we have multi tenancy project and we want to set it base in subdomain, How can we do that?

thanks


4 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team
    • What is your product version?
    • What is your product type (Angular or MVC)?
    • What is product framework type (.net framework or .net core)?
  • User Avatar
    0
    qualifyme created

    we are using .net core jquery and aspnet zero v6.2 currently, we are slowly upgrading it to newer version

  • User Avatar
    1
    maliming created
    Support Team

    You can configure the domain format in the PreInitialize method of your module (like Configuration.Modules.AbpWebCommon().MultiTenancy.DomainFormat = "{0}.mydomain.com";). If the domain format is "{0}.mydomain.com" and the current host of the request is acme.mydomain.com, then the tenancy name is resolved as "acme". The next step is to query ITenantStore to find the TenantId by the given tenancy name. If a tenant is found, then it's resolved as the current TenantId.

  • User Avatar
    0
    qualifyme created

    thanks for the reply will try to do this guide. thanks again