0
bulutyonetim created
Please answer the following questions before submitting an issue.
- What is your product version? 9.0.1
- What is your product type (Angular or MVC)? Angular (single solution)
- What is product framework type (.net framework or .net core)? ASP.NET CORE
Hi,
I need to change tenant based on my requirements on only login page.
- If URL does not contain any subdomain like mysite.com/account/login should sign in users into default tenant. I found that I can set the tenant to default on LoginService.ts like this
init(): void {
abp.multiTenancy.setTenantIdCookie(1);
....
}
- If URL contains any subdomain like tenantX.mysite.com/account/login should sign in users into tenantX Can you guid me how to do this?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
1 Answer(s)
-
0
I don't think any changes are needed, because ABP has implemented
DomainTenantResolveContributoras the preferred resolver, and it will use your second-level domain name as the tenant name. If you want to implement your own resolution strategy, you only need to implement theITenantResolveContributorinterface, and then add it to the module's PreInitialize() method, like this.public class YourModule : AbpModule { public override void PreInitialize() { Configuration.MultiTenancy.Resolvers.Add<YourResolveContributor>(); } }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)