Open Closed

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


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)
  • 1
    maliming created
    • What is your product version?
    • What is your product type (Angular or MVC)?
    • What is product framework type (.net framework or .net core)?
  • 0
    qualifyme created

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

  • 1
    maliming created

    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.

  • 0
    qualifyme created

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