Hi ANZ,
I would like to implement tenancy name in URL for multi tenant, currently i setup subdomain as tenancy name as ANZ support. I would like to have tenancy name in URL as below,
http://mydomain.com/{TENANCY_NAME}/account/login
I tried to setup however its not working.
Is there any configuration changes or other way to achive this feature?
Thanks, SRTMDEV
15 Answer(s)
-
0
Hi @SRTMDEV
What problem did you face, could you share it as well ?
-
0
-
0
Hi @SRTMDEV
It seems like the URL is constructed wrongly. Is there a chance for us to test this on your app ?
Thanks,
-
0
Hi @ismcagdas,
find code for angular and api in below linkg,
Link removed for security reasons
Thanks.
-
0
Hi **@SRTMDEV **
Since this is a public place, the link was visible to everyone. Is it possible to share the link with [email protected] ? I couldn't get the link before it was removed.
Thanks,
-
0
Hi @ismcagdas,
Please check [email protected] i sent mail few days before with issue id.
Thanks, SRTMDEV
-
0
Hi,
any update on this context?
-
0
Hi @ismcagdas,
Any update on this context,
Please response we need an priority base solution.
Thanks, SRTMDEV
-
0
Hi @SRTMDEV
It does not work beacuse you should also change that code part. https://github.com/aspnetzero/aspnet-zero-core/blob/39f9c6ab314eb56580e33205c426cfb11f618519/angular/src/shared/common/nav/app-url.service.ts#L39-L44 It searches for
AppUrlService.tenancyNamePlaceHolder + '.'
and replaces it. You should search and replace"/"+AppUrlService.tenancyNamePlaceHolder
.Since it does not replace
/
your approoturl has additional/
. See :if (baseUrl.indexOf('/' + AppUrlService.tenancyNamePlaceHolder) >= 0) { baseUrl = baseUrl.replace('/' + AppUrlService.tenancyNamePlaceHolder, AppUrlService.tenancyNamePlaceHolder); if (tenancyName) { tenancyName = '/' + AppUrlService.tenancyNamePlaceHolder; } }
-
0
-
0
Hi @SRTMDEV
Sorry, I missunderstand the question wrong at first. In Angular version, it is not supported to use TENANCY_NAME as a subpath in your URLs. You can try using it as a subdomain.
-
0
Hi @ismcagdas,
Its also not working API side also.
Any suggestion to achive this functionality ?
Thanks, SRTMDEV
-
0
Hi @SRTMDEV
You should also change the tenancy resolver in server side. Here is where aspnetboilerplate resolves tenant: https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs You can please create your own implementation that inherits ITenantResolveContributor and implement it as seen below.
Configuration.MultiTenancy.Resolvers.Add<MyCustomTenantResolveContributor>();
-
0
Hi,
Thanks for prompt response.
I will try and update you if any issue.
Thanks, SRTMDEV
-
0
Hi @SRTMDEV
It is also hard to implement this on server side.
Consider a URL like this -> https://mywebsite.com/tenant1/app/users. Normally this URL needs to use Users controller under the area App. So, you can configure the ASP.NET Core routing to not handle the first parameter after the URL. In that case, you don't need to write a custom Tenant resolver.