Base solution for your next web application

Activities of "kylem"

We are at the version 12.3.1 and experienced the same issue when we tried using VS 17.9.x It was fixed after downgrading it to 17.8.5 Upgrading Castle.Windsor.MsDependencyInjection NuGet packages didn't help.

Answer

hi, I already have that file on our own instance of framework and can see the content on our end , your reply about you need to change this function to handle your requirement. was not helpful since I am not sure why we need to modify an internal file on framework to support env agnostic deployments.

Answer

Hi, the link provided is not accessible and returns 404,

I looked into that files locally and am not able to relate to my question would you please provide more details?

thanks, Moe

Issue created: https://github.com/aspnetzero/aspnet-zero-core/issues/4957

Some more info:

We are currently migrating to version 12.2.1 of the framework, which uses ABP v8.2.0. Our current version in production is using v7.1.0 of ABP.

In both cases same exception is thrown.

8.2.0

This is great to hear, thanks.

Thanks for the confirmation. I will close the issue. Peja

Update:

I got it working by applying changes similar to what we did earlier for 'removing tenant from the login screen'.

I added following code to TokenAuthController.SendTwoFactorAuthCode() Can you please review and let me know if this is correct change and if something should be removed or added?

[HttpPost]
public async Task SendTwoFactorAuthCode([FromBody] SendTwoFactorAuthCodeModel model)
{
    using (UnitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant))
    {
        var user = await _userManager.GetUserByIdAsync(model.UserId);
        var tenantId = await _userManager.TryGetTenantIdOfUser(user.UserName);

        //var cacheKey = new UserIdentifier(AbpSession.TenantId, model.UserId).ToString();
        var cacheKey = new UserIdentifier(tenantId, model.UserId).ToString();
        ...

That was it :)

It looks like that Cloudflare will strip any header containing dot (.) character. So I searched it up a bit and realized that I can configure my app to use some other header name for TenandId.

I ended up adding this line into {MyApp}CoreModule.cs:

 //Clouflare doesn't like default TenantIdResolveKey Abp.TenantId
Configuration.MultiTenancy.TenantIdResolveKey = "MyApp-TenantId";

Also, I changed this line in abp.js:

abp.multiTenancy.tenantIdCookieName = 'MyApp-TenantId';

Also, needed to adjust some test cases on server side that are utilizing TenandIdResolveKey

I tested it and it looks good when deployed with cloudflare.

Can you please confirm if those changes are enough?

Thanks again for the quick turnaround on this issue.

Peja

Showing 1 to 10 of 23 entries