你好
Volo.Abp.Http.Client.ClientProxying.ClientProxyBase 中哪个对象是 null?
如何复现呢?
hi
Do you get any errors/exceptions with your custom login page?
Thanks.
hi
Then I try the login again, the app throw 400 error instead of the 409
Please share full 400 error logs.
Thanks
hi
The download token AbsoluteExpirationRelativeToNow is short. You can increase the time
public virtual async Task<DownloadTokenResultDto> GetDownloadTokenAsync()
{
var token = Guid.NewGuid().ToString("N");
await DownloadTokenCache.SetAsync(
token,
new IdentityUserDownloadTokenCacheItem { Token = token, TenantId = CurrentTenant.Id },
new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(30)
});
return new DownloadTokenResultDto
{
Token = token
};
}
if (invalidUsers.Any())
{
var token = Guid.NewGuid().ToString("N");
await ImportInvalidUsersCache.SetAsync(
token,
new ImportInvalidUsersCacheItem
{
Token = token,
InvalidUsers = invalidUsers,
FileType = input.FileType
},
new DistributedCacheEntryOptions
{
AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(1)
});
resultDto.InvalidUsersDownloadToken = token;
}
Yes, 9.3 will fix that.
Thanks.
Thanks. We will check it.
And can you try to add MyAbpEfCoreNavigationHelper to your EF Core project.
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore.ChangeTrackers;
using Volo.Abp.OpenIddict.Tokens;
namespace Pusula.Training.HealthCare.EntityFrameworkCore;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpEfCoreNavigationHelper))]
public class MyAbpEfCoreNavigationHelper : AbpEfCoreNavigationHelper
{
public override void ChangeTracker_Tracked(object? sender, EntityTrackedEventArgs e)
{
if (e.Entry.Entity.GetType() == typeof(OpenIddictToken))
{
return;
}
base.ChangeTracker_Tracked(sender, e);
}
public override void ChangeTracker_StateChanged(object? sender, EntityStateChangedEventArgs e)
{
if (e.Entry.Entity.GetType() == typeof(OpenIddictToken))
{
return;
}
base.ChangeTracker_StateChanged(sender, e);
}
}
hi
We will support this case by https://github.com/abpframework/abp/pull/22632
You can add MyEditionFeatureValueProvider to fix it now.
public class FeatureTestDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
//...
PostConfigure<AbpFeatureOptions>(options =>
{
options.ValueProviders.InsertAfter(r => r == typeof(EditionFeatureValueProvider),
typeof(MyEditionFeatureValueProvider)
);
options.ValueProviders.Remove<EditionFeatureValueProvider>();
});
//...
}
}
using System.Security.Principal;
using System.Threading.Tasks;
using Volo.Abp.Features;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Saas.Tenants;
namespace FeatureTest;
public class MyEditionFeatureValueProvider : FeatureValueProvider
{
public const string ProviderName = "E";
public override string Name => ProviderName;
protected ICurrentPrincipalAccessor PrincipalAccessor;
protected ITenantRepository TenantRepository;
protected ICurrentTenant CurrentTenant { get; }
public MyEditionFeatureValueProvider(IFeatureStore featureStore, ICurrentPrincipalAccessor principalAccessor, ITenantRepository tenantRepository, ICurrentTenant currentTenant)
: base(featureStore)
{
PrincipalAccessor = principalAccessor;
TenantRepository = tenantRepository;
CurrentTenant = currentTenant;
}
public override async Task<string?> GetOrNullAsync(FeatureDefinition feature)
{
var editionId = PrincipalAccessor.Principal?.FindEditionId();
if (editionId == null)
{
if (!CurrentTenant.Id.HasValue)
{
return null;
}
var tenant = await TenantRepository.FindByIdAsync(CurrentTenant.Id.Value);
if (tenant == null || !tenant.EditionId.HasValue)
{
return null;
}
editionId = tenant.EditionId;
}
return await FeatureStore.GetOrNullAsync(feature.Name, Name, editionId.Value.ToString());
}
}