Could you please share a minimal reproducible project with me? i will check it.
shiwei.liang@volosoft.com
Hi,
could you please share the full logs?
Hi,
You can override the IdentitySessionManager
to debug it step by step.
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IdentitySessionManager))]
public class MyIdentitySessionManager : IdentitySessionManager
{
public MyIdentitySessionManager(IIdentitySessionRepository identitySessionRepository, ICurrentUser currentUser, IDistributedCache<IdentitySessionCacheItem> cache, ISettingProvider settingProvider, IdentityDynamicClaimsPrincipalContributorCache identityDynamicClaimsPrincipalContributorCache) : base(identitySessionRepository, currentUser, cache, settingProvider, identityDynamicClaimsPrincipalContributorCache)
{
}
public override async Task<IdentitySession> FindAsync(Guid id)
{
return await UpdateSessionFromCacheAsync(await IdentitySessionRepository.FindAsync(id));
}
public override async Task<IdentitySession> FindAsync(string sessionId)
{
return await UpdateSessionFromCacheAsync(await IdentitySessionRepository.FindAsync(sessionId));
}
protected override async Task<IdentitySession> UpdateSessionFromCacheAsync([CanBeNull] IdentitySession session)
{
if (session == null)
{
return null;
}
var sessionCacheItem = await Cache.GetAsync(session.SessionId);
if (sessionCacheItem != null && await UpdateSessionFromCacheAsync(session, sessionCacheItem))
{
await IdentitySessionRepository.UpdateAsync(session);
}
return session;
}
protected override Task<bool> UpdateSessionFromCacheAsync(IdentitySession session, IdentitySessionCacheItem sessionCacheItem)
{
if (session == null)
{
return Task.FromResult(false);
}
if (sessionCacheItem == null)
{
return Task.FromResult(false);
}
var changed = false;
if (sessionCacheItem.CacheLastAccessed != null && (session.LastAccessed == null || sessionCacheItem.CacheLastAccessed > session.LastAccessed))
{
session.UpdateLastAccessedTime(sessionCacheItem.CacheLastAccessed);
changed = true;
}
if (!sessionCacheItem.IpAddress.IsNullOrWhiteSpace())
{
var ipAddresses = session.GetIpAddresses().ToList();
ipAddresses.RemoveAll(x => x == sessionCacheItem.IpAddress);
ipAddresses.Add(sessionCacheItem.IpAddress);
session.SetIpAddresses(ipAddresses);
changed = true;
}
return Task.FromResult(changed);
}
}
HI,
This is the full method code
protected virtual async Task CheckSizeAsync(long contentLength)
{
if (contentLength > FileDescriptorConsts.MaxSizeLength)
{
throw new UserFriendlyException(L["FileTooBig", BeautifySize(FileDescriptorConsts.MaxSizeLength)]); ;
}
var maxSizeDescription = await FeatureChecker.GetOrNullAsync(FileManagementFeatures.StorageSize);
if (maxSizeDescription == null || maxSizeDescription == "0")
{
return;
}
var maxSize = long.Parse(maxSizeDescription);
var totalStorage = await FileDescriptorRepository.GetTotalSizeAsync();
if ((totalStorage + contentLength) < maxSize)
{
return;
}
var remainedSize = (maxSize - totalStorage);
throw new NotEnoughStorageSizeException(BeautifySize(maxSize), BeautifySize(remainedSize));
}
https://abp.io/docs/latest/release-info/migration-guides/abp-8-3#angular-ui
Yes, you are right, we will update the document, you ticket was refunded
You can read these documents to understand it
https://abp.io/docs/latest/framework/fundamentals/connection-strings https://abp.io/docs/latest/framework/architecture/multi-tenancy