Starts in:
1 DAY
21 HRS
5 MIN
17 SEC
Starts in:
1 D
21 H
5 M
17 S
Open Closed

How to support multi-tenant as subdomain in azure app service #1876


User avatar
0
MahmoudA created

Dear all,

would you please help me solve this issue? I am trying to support this scenarion 1- The host used the API https://fwateer.azuresites.net/api/saas/tenants to create an active tenant named "tenant123" 2- The user tenant "Tenant123" ants to access our apis using https://tenant123.fwateer.azuresites.net/api/app/[apiname]

When we try to access the site using the subdomain tenant123.fwa.... it does not work, although we have the below code in the configservice

would you please send me the steps to atchive such thing. Thanks Mahmoud

context.Services.AddAbpStrictRedirectUriValidator();
            context.Services.AddAbpClientConfigurationValidator();
            context.Services.AddAbpWildcardSubdomainCorsPolicyService();
            Configure<AbpTenantResolveOptions>(options =>
            {
                options.AddDomainTenantResolver("{0}.fwateer.azurewebsites.net:44318");
            });

            Configure<IdentityServerOptions>(options =>
            {
                options.IssuerUri = configuration["App:SelfUrl"];
            });

12 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    We have an exmaple for DomainTenantResolver, you can check it first: https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

    If this not help, I check it remotely. shiwei.liang@volosoft.com

  • User Avatar
    0
    MahmoudA created

    Hi,

    We have an exmaple for DomainTenantResolver, you can check it first: https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

    If this not help, I check it remotely. shiwei.liang@volosoft.com

    Hi liangshiwei I already check on this sample but it is not useful

    Please let me know the time of remotely session. Thanks for help

    Mahmoud

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Please send email to me. shiwei.liang@volosoft.com

  • User Avatar
    0
    MahmoudA created

    Hi,

    Please send email to me. shiwei.liang@volosoft.com

    I sent to you an email

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi MahmoudA

    Can you share the details of what you tried?

    Are there any error logs?

  • User Avatar
    0
    MahmoudA created

    hi MahmoudA

    Can you share the details of what you tried?

    Are there any error logs?

    hi maliming i want to read tenant that host created from url like i described in issue details

  • User Avatar
    0
    MahmoudA created

    and i want it to work in development environment (localhost) and production environment (azure)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is the demo works on your localhost?

    https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

  • User Avatar
    0
    MahmoudA created

    hi

    Is the demo works on your localhost?

    https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver

    no, not

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    This demo has been tested by many developer. How do you run it? What steps are not working?

  • User Avatar
    0
    MahmoudA created

    hi

    This demo has been tested by many developer. How do you run it? What steps are not working?

    hi No exception appear. Can u tell me the steps to configure subdomain to use it in local or azure ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    For Azure, you also need to configure wildcard domain.

    Here is my steps:

    1. Open MVC-TIERED project.
    2. RunAcme.BookStore.DbMigrator
    3. Run Acme.BookStore.IdentityServer, Acme.BookStore.HttpApi.Host and Acme.BookStore.Web.

    Login in Acme.BookStore.Web and create a tenant.

    https://tenant1.web.getabp.net:44303/

    Login => https://tenant1.ids.getabp.net:44301/Account/Login/.....

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06