Base solution for your next web application
Open Closed

Multitenancy resolution #5

User avatar
keirk created

Could someone point me in the right direction - I'm trying to understand how multi tenancy is resolved in module zero, and how I could implement custom resolution (using something other than subdomain).


1 Answer(s)
  • User Avatar
    hikalkan created
    Support Team


    If you are using multi-tenancy, first you should enable it. Then you can use UserManager's LoginAsync method to login. After login, you can use IAbpSession.TenantId to get current tenant's id. If you are not in host mode (when you don't provide tenancy name, you will be logged in as host) then TenantId will be null.

    To resolve tenancy name, you can use any method including subdomain. Even a simple login form with tenancy name, user name and password. See <a class="postlink" href=""> ... troller.cs</a> for a sample of login operation.

    I'm actively working on mutli-tenancy implementation. So, thing may change. I will document in detail when it will be stable.