Hi. I have tried to set up our merged Angular project to work with subdomains but if I go to url tenantname.oursite.net, it will open the site, but it tryes to login to the HOST, not Tenant. So the tenant name part is being ignored in url. Does anyone have a clue where we have gone wrong?
We have put Angular project src/assets/appconfig.production.json "remoteServiceBaseUrl": "https://{TENANCY_NAME}.oursite.net", "appBaseUrl": "https://{TENANCY_NAME}.oursite.net",
and I have tried to set appsettings.production.json WebSiteRootAddress and ClientRootAddress same way.
In the documents [https://aspnetzero.com/Documents/Development-Guide-Angular#configuration])
Tenancy name can also be configured for remoteServiceBaseUrl as similar but when it is necessary?
If I follow these instructions [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=10132&hilit=TENANCY_NAME&start=10]) I should only set appBaseUrl and ClientRootAddress with TENANCY_NAME placeholder.
and here [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=10422&hilit=wwwroot+dist#p24966]) is suggested that I should put placeholder on every url..
4 Answer(s)
-
0
@MikaTmlVertti,
- Could you also share your server side config file ?
- Could you also check browser console and see what is the request url to server when you visit tenantname.oursite.net ?
- I think tenant with a name "tenantname" already exists in the database, right ?
-
0
Hi. I send some detail info to your info@aspnetzero.
We set all our server side config data from azures enviromental settings. But for the summarise: App:ClientRootAddress -> https://{TENANCY_NAME}.oursite.net App:WebSiteRootAddress -> https://{TENANCY_NAME}.oursite.net
The request url is same: tenantname.oursite.net
Yes, tenant name is "ABC" and in url it is "abc". We are able to select it when {TENANCY_NAME} is not being used.
-
0
Problem solved with this: There was wrong parameter in appsettings.production.json, WebSiteRootAddress should be ServerRootAddress. After this was changed, it started to work correctly.
If anyone else is going to use Azure and Angular (merged), put {TENANCY_NAME}.yourCustomUrl.end to each setting, and in Azure, make sure Custom domains has *.yourCustomUrl.end and yourCustomUrl.end assigned to the site.
Thank you for your support!
-
0
Thanks :). It is also fixed here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1380">https://github.com/aspnetzero/aspnet-ze ... ssues/1380</a>.