Base solution for your next web application
Open Closed

Tenant Subdomain #10551


User avatar
0
QuickApp created

What is your product version? v10.2.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .Net Core

Hello, I want to enable tenant subdomain in front-end. But I don't want to use subdomain on API side. I tried the following way, it gave error:

appsettings.json "App": { "ServerRootAddress": "http://api.domain.com/", "ClientRootAddress": "http://{TENANCY_NAME}.domain.com/", "CorsOrigins": "http://*.domain.com,http://api.domain.com/" }

Can you help me with this?


5 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @QuickApp

    Can you please share the error you encountered?

  • User Avatar
    0
    QuickApp created

    When I try the file as above, the user information is incorrect because the tenantId value is not gone.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @QuickApp

    Could you check if you have this section in your AppPreBoostrap.ts in the Angular app, see https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/AppPreBootstrap.ts#L132. Normally, the tenantId should be stored locally on hte Angular app using cookies in your scenario.

  • User Avatar
    0
    QuickApp created

    Hi @ismcagdas Yes, when I checked I saw that this page exists.

  • User Avatar
    0
    musa.demir created

    Can you please check that question https://support.aspnetzero.com/QA/Questions/10459/tenancy-name-in-URL-httpmydomaincomTENANCYNAME?