Base solution for your next web application
Open Closed

Find tenant by domain instead of subdomain #2484


User avatar
0
ianmark89 created

Hi,

I added new property called "Domain" to Tenant entity and updated TenantIdAccessor to find tenant by domain, but you've removed this class in version 3.1.0. Where can I put my changes to find tenant by domain?


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This logic is moved to ABP framework. You can create a custom class like this one <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributer.cs">https://github.com/aspnetboilerplate/as ... ributer.cs</a> and add it as the first resolver to Configuration.MultiTenancy.Resolvers.

    You can also read Determining Current Tenant section of this document <a class="postlink" href="http://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy">http://aspnetboilerplate.com/Pages/Docu ... ti-Tenancy</a>.

  • User Avatar
    0
    ianmark89 created

    Which is file I can put Configuration.MultiTenancy.Resolver?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can put it in your WebModule's PreInitialize method.

  • User Avatar
    0
    ianmark89 created

    Thanks for your answer. I've got CGI issue when find tenant by domain by TenantManager. Do you have any idea about this?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you have any exception message or screenshot which you can share with us ?