Base solution for your next web application
Open Closed

Nginx and Abp.TenantId (TenantIdResolveKey) Issue #7642


User avatar
0
Riaan.Smit created

Hi, I'm working on an Angular, .net Core project (downloaded in July 2019).

After deploying to production, and realizing that the prod server is running nginx (resulting in not being able to change the tenant), I followed the below threads to update my code:

https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4349/files https://stackoverflow.com/questions/49783689/cannot-get-header-that-contains-a-period-from-nginx?answertab=active#tab-top

Now I can't change the Tenant in my Dev environment. I changed all the references to Abp.TenantId to Abp-TenantId in both server and client project, and I can see the cookie getting set to Abp-TenantId, however the Tenant is never changed.

I'm not sure if I'm missing something? ANy help or advise will be greatly appreciated!

-----Update

It seems that the AbpSession.TenantId is never set, but I can't find where the property is actually set to check what is going on there.

And on a side note, should the header .AspNetCore.Culture not also be changed to AspNetCore-Culture?


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

    hi @Riaan.Smit

    You also need to configure it on the client side:

    abp.multiTenancy.tenantIdCookieName = 'Abp-TenantId';
    
  • User Avatar
    0
    Riaan.Smit created

    Hi Maliming,

    The value is set on the client side. It's in abp.js correct? That's the only place I could find to set it. Is there somewhere else I also need to set it?

  • User Avatar
    0
    maliming created
    Support Team

    This is a problem, I have created an issue on Github, please follow this issue, we will solve it soon. Thank you

    https://github.com/aspnetzero/aspnet-zero-core/issues/2651

  • User Avatar
    0
    Riaan.Smit created

    Thank you for the quick response!