Base solution for your next web application
Open Closed

Make tenancy name and themeable with domain #1839


User avatar
0
ianmark89 created

Some of my clients want to use their domain and theme. How can I make my application to detect tenancy name and theme by domain (not subdomain).


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

    Hi,

    You can modify SubdomainTenancyNameFinder in order to find tenancy name from current url or you can implement a custom ITenancyNameFinder and use it instead of SubdomainTenancyNameFinder.

    Currently AspNet zero does not have a built in feature fo using different themes for different tenants. You have to implement it by yourself.

  • User Avatar
    0
    ianmark89 created

    Thanks for your supporting :)

  • User Avatar
    0
    ianmark89 created

    I've implemented function to detect tenant by domain name, but I got error when logging with social account like facebook.

    The INSERT statement conflicted with the FOREIGN KEY SAME TABLE constraint "FK_dbo.AbpUsers_dbo.AbpUsers_CreatorUserId". The conflict occurred in database "***", table "dbo.AbpUsers", column 'Id'.

    This issue is also happened with SubdomainTenancyNameFinder. I can login/ register with external login by entering Tenancy name manually.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    There is an issue about it <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/371">https://github.com/aspnetzero/aspnet-zero/issues/371</a>. Did you enabled foreign keys for user table ?

    I suggest you to drop foreign keys until we solve this problem.

    Thanks.

  • User Avatar
    0
    ianmark89 created

    I've dropped the foreign keys and it works. Thanks for your supporting.