Base solution for your next web application
Open Closed

Azure hosting - Tenant switches to Host #8721


User avatar
0
ian1908 created

Hi,

I have deployed my back-end to Azure and want to use multitenancy. However, it seems then even when using the Tenancy subdomain the Host is being used, and only the Host login works.

I setup the appsetting.production.json

"App": { "ServerRootAddress": "http://{TENANCY_NAME}.myapi.nl", "ClientRootAddress": "https://{TENANCY_NAME}.myapp.nl", "CorsOrigins": "https://{TENANCY_NAME}.myapp.nl" }

And the appconfig.production.json

"remoteServiceBaseUrl": "http://{TENANCY_NAME}.myapi.nl", "appBaseUrl": "https://{TENANCY_NAME}.myapp.nl",

When using; http://myapi.nl/AbpUserConfiguration/GetAll?d=xxxxxxxxxxxxxx

i get the same result as when i use; http://mytenant.myapi.nl/AbpUserConfiguration/GetAll?d=xxxxxxxxxxxxxx

Dont know if that should be the case.

My Azure settings are as follows;

Please assist.

Regards.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    Can you confirm if appsetting.production.json and appconfig.production.json is used?

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-3.1

  • User Avatar
    0
    ian1908 created

    Hi,

    Yes, they are being used.

    Regards,

    Ian

  • User Avatar
    0
    maliming created
    Support Team

    hi ian1908

    Can you share the URL of angular and api to me? And a tenant name.

    [email protected]

  • User Avatar
    0
    maliming created
    Support Team

    hi @ian1908

    I think your production environment does not take effect or the configuration is wrong.

    Your site:

    Demo site:

  • User Avatar
    0
    ian1908 created

    Hi,

    Thank you.

    I changed the settings in appsettings.json and it worked. Any pointers why Azure is not pickup up the appsettings.Production.json?

    Regards,

    Ian

  • User Avatar
    0
    maliming created
    Support Team

    Any pointers why Azure is not pickup up the appsettings.Production.json?

    hi

    Maybe you can refer to azure's documentation.

    Asp net core documentation: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-3.1