Starts in:
2 DAYS
9 HRS
29 MIN
58 SEC
Starts in:
2 D
9 H
29 M
58 S

Activities of "dev3.advantiss"

Hello, I use Identity Server... After upgrade ABP from 5.3.3 to 7.3.1 I have a problem... The repositories MongoDeviceFlowCodesRepository and MongoPersistentGrantRepository invoke method DeleteDirectAsync { .... await collection.DeleteManyAsync( dbContext.SessionHandle, Builders<PersistedGrant>.Filter.Where(predicate), cancellationToken: cancellationToken ); .... }

but dbContext.SessionHandle = null and that method is crashed

I replaced these Repositories, so I will not use dbContext.SessionHandle if it is null.

this code appeared in 7.3.1,

  1. why you start using dbContext.SessionHandle?
  2. what is best decision for solve this problem?
  • ABP Framework version: v7.3.1
  • UI Type: Angular
  • Database System: MongoDB
  • Exception message and full stack trace: 2023-11-01 03:10:13.137 +00:00 [ERR] Job DEFAULT.Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker threw an unhandled Exception: System.ArgumentNullException: Value cannot be null. (Parameter 'session') at MongoDB.Driver.Core.Misc.Ensure.IsNotNull[T](T value, String paramName) at MongoDB.Driver.MongoCollectionImpl1.BulkWriteAsync(IClientSessionHandle session, IEnumerable1 requests, BulkWriteOptions options, CancellationToken cancellationToken) at MongoDB.Driver.MongoCollectionBase1.DeleteManyAsync(FilterDefinition1 filter, DeleteOptions options, Func3 bulkWriteFuncAsync) at Volo.Abp.Domain.Repositories.MongoDB.MongoDbRepository2.DeleteDirectAsync(Expression1 predicate, CancellationToken cancellationToken) at Volo.Abp.IdentityServer.MongoDB.MongoPersistentGrantRepository.DeleteExpirationAsync(DateTime maxExpirationDate, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.RemoveGrantsAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.CleanAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker.DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) at Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter1.Execute(IJobExecutionContext context) at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken) 2023-11-01 03:10:13.226 +00:00 [ERR] Job DEFAULT.Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker threw an exception. Quartz.SchedulerException: Job threw an unhandled exception. ---> System.ArgumentNullException: Value cannot be null. (Parameter 'session') at MongoDB.Driver.Core.Misc.Ensure.IsNotNull[T](T value, String paramName) at MongoDB.Driver.MongoCollectionImpl1.BulkWriteAsync(IClientSessionHandle session, IEnumerable1 requests, BulkWriteOptions options, CancellationToken cancellationToken) at MongoDB.Driver.MongoCollectionBase1.DeleteManyAsync(FilterDefinition1 filter, DeleteOptions options, Func3 bulkWriteFuncAsync) at Volo.Abp.Domain.Repositories.MongoDB.MongoDbRepository2.DeleteDirectAsync(Expression1 predicate, CancellationToken cancellationToken) at Volo.Abp.IdentityServer.MongoDB.MongoPersistentGrantRepository.DeleteExpirationAsync(DateTime maxExpirationDate, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.RemoveGrantsAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.CleanAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker.DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) at Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter1.Execute(IJobExecutionContext context) at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken) --- End of inner exception stack trace --- [See nested exception: System.ArgumentNullException: Value cannot be null. (Parameter 'session') at MongoDB.Driver.Core.Misc.Ensure.IsNotNull[T](T value, String paramName) at MongoDB.Driver.MongoCollectionImpl1.BulkWriteAsync(IClientSessionHandle session, IEnumerable1 requests, BulkWriteOptions options, CancellationToken cancellationToken) at MongoDB.Driver.MongoCollectionBase1.DeleteManyAsync(FilterDefinition1 filter, DeleteOptions options, Func3 bulkWriteFuncAsync) at Volo.Abp.Domain.Repositories.MongoDB.MongoDbRepository2.DeleteDirectAsync(Expression1 predicate, CancellationToken cancellationToken) at Volo.Abp.IdentityServer.MongoDB.MongoPersistentGrantRepository.DeleteExpirationAsync(DateTime maxExpirationDate, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.RemoveGrantsAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupService.CleanAsync() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.IdentityServer.Tokens.TokenCleanupBackgroundWorker.DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) at Volo.Abp.BackgroundWorkers.Quartz.QuartzPeriodicBackgroundWorkerAdapter1.Execute(IJobExecutionContext context) at Quartz.Core.JobRunShell.Run(CancellationToken cancellationToken)]
  • ABP Framework version: v5.3.3
  • UI Type: Angular
  • Database System: MongoDB

Hello

I have found some code with query(It did not work in CosmosDB):


namespace Volo.Abp.PermissionManagement.MongoDB;

public class MongoPermissionGrantRepository :   MongoDbRepository<IPermissionManagementMongoDbContext, PermissionGrant, Guid>,
    IPermissionGrantRepository
{
    public MongoPermissionGrantRepository(IMongoDbContextProvider<IPermissionManagementMongoDbContext> dbContextProvider)
        : base(dbContextProvider)
    {

  }

    public virtual async Task<PermissionGrant> FindAsync(
        string name,
        string providerName,
        string providerKey,
        CancellationToken cancellationToken = default)
    {
        cancellationToken = GetCancellationToken(cancellationToken);
        return await (await GetMongoQueryableAsync(cancellationToken))
            **.OrderBy(x => x.Id)**
            .FirstOrDefaultAsync(s =>
                s.Name == name &&
                s.ProviderName == providerName &&
                s.ProviderKey == providerKey,
                cancellationToken
            );
    }

MongoDB get next query:

"aggregate":"AbpPermissionGrants",
      "pipeline":[
         {
            "$match":{
               "TenantId":null
            }
         },
         {
            "$sort":{
               "_id":1
            }
         },
         {
            "$match":{
               "Name":"Dibl.Themes.View",
               "ProviderName":"R",
               "ProviderKey":"Facilitator"
            }
         },

Why did you use OrderBy(x => x.Id) in this query? And I think "$sort" hurts query performance...

Best regards, Advantiss Inc

By default file-management can upload all types of file Need to upload only some types of files with extensions "JPEG,PNG,ICO.GIF,TIFF". Could I do this simple or I need to correct file-management module? Maybe simple solution exists, but I can not found it.

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Best regards Advantiss.

Need to add validation messages for Add Tenant form as on Add User form If click Save on empty user form I will get error messages

but on empty Add Tenant form button Save disables, and users can not get information for incorrect fields

I removed code for disabling button, but I could not get any messages from field validations I used Volo.Identity.Pro How I can do this in best way?

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes

Thank you. Best regards Advantiss.

I have got problem with Redis cache Many values cache in Redis and get after load any page or refesh page...

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes

All languages, permissions and settings are cached I need to cache some entities only.

Is it possible to separate ways of storing data?

  • ABP data (for the entire site) was stored in memory as before
  • Сached data only for users

What do I need to do with this problem?

.................... 15:26:01.917 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpValidation_en" "1200"15:26:01.957 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "absexp" "sldexp" "data"15:26:01.998 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "1200"15:26:02.038 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "absexp" "sldexp" "data"15:26:02.079 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpUi_en" "1200"15:26:02.119 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "absexp" "sldexp" "data"15:26:02.159 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "1200"15:26:02.200 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "absexp" "sldexp" "data"15:26:02.240 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.LanguageManagement.Texts,k:AbpExceptionHandling_en" "1200"15:26:02.338 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.379 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "1200"15:26:02.427 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.468 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "1200"15:26:02.515 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:02.556 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "1200"15:26:04.963 [0 188.163.21.143:58665] "info"15:26:05.312 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.352 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Themes" "1200"15:26:05.401 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.443 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:R,pk:admin,n:Dibl.Themes" "1200"15:26:05.462 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Cases" "absexp" "sldexp" "data"15:26:05.490 [0 188.163.21.143:59037] "HMGET" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:C,pk:Dibl_App,n:Dibl.Themes" "absexp" "sldexp" "data"15:26:05.502 [0 188.163.21.143:59037] "EXPIRE" "Dibl_c:Volo.Abp.PermissionManagement.PermissionGrant,k:pn:U,pk:2fba660d-c3af-ac4f-4d14-3a058fdf586f,n:Dibl.Cases" "1200" ....................

Best Regards Advantiss.

I tried to use redis, but I got to decrease performance Site works very slowly and all entities are cached. I do not need cache all entities. I created new project with ABP version 5.3.1 - redis works fine If I use local redis, site will work good I try to use redis in Azure and another machine - I have problems with performance...

I created simple project with redis. Redis test project

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
2022-07-21 20:37:54.876 +03:00 [DBG] CORS request made for path: /api/abp/application-configuration from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
2022-07-21 20:37:54.876 +03:00 [INF] No CORS policy found for the specified request.
2022-07-21 20:37:54.882 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2022-07-21 20:37:54.889 +03:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
2022-07-21 20:37:54.926 +03:00 [INF] Executing AbpApplicationConfigurationAppService.GetAsync()...
2022-07-21 20:37:55.612 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:FeatureManagement.ManageHostFeatures,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles.Create,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:AbpIdentity.Roles.Update,pn:U,pk:0dd8a970-4a2a...........................................................................d8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Create,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Edit,pn:U,pk:0dd8a970-4a2a-53fd-4117-39fcf9f8b8be,n:Realtor.RealEstates.Delete
2022-07-21 20:37:55.732 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: U,0dd8a970-4a2a-53fd-4117-39fcf9f8b8be
2022-07-21 20:37:55.811 +03:00 [DBG] Setting the cache items. Count: 68
2022-07-21 20:37:55.890 +03:00 [DBG] Finished setting the cache items. Count: 68
2022-07-21 20:37:55.903 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Ro..................................................tes.Edit,pn:R,pk:admin,n:Realtor.RealEstates.Delete
2022-07-21 20:37:55.961 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: R,admin
2022-07-21 20:37:55.974 +03:00 [DBG] Setting the cache items. Count: 68
2022-07-21 20:37:56.047 +03:00 [DBG] Finished setting the cache items. Count: 68
2022-07-21 20:37:56.054 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Realtor_App,n:AbpIdentity.UserLookup
2022-07-21 20:37:56.108 +03:00 [DBG] Not found in the cache: pn:C,pk:Realtor_App,n:AbpIdentity.UserLookup
2022-07-21 20:37:56.112 +03:00 [DBG] Getting all granted permissions from the repository for this provider name,key: C,Realtor_App
2022-07-21 20:37:56.123 +03:00 [DBG] Setting the cache items. Count: 77
2022-07-21 20:37:56.203 +03:00 [DBG] Finished setting the cache items. Count: 77
2022-07-21 20:37:56.218 +03:00 [INF] STOPWATCH ApplicationAuthConfigurationDto() - 1288
2022-07-21 20:37:56.221 +03:00 [INF] STOPWATCH GetFeaturesConfigAsync() - 1
2022-07-21 20:37:56.333 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 1 - 109
2022-07-21 20:38:04.545 +03:00 [DBG] Executing HealthCheck collector HostedService.
2022-07-21 20:38:04.547 +03:00 [INF] Start processing HTTP request GET "https://localhost:44358/health-status"
2022-07-21 20:38:04.547 +03:00 [INF] Sending HTTP request GET "https://localhost:44358/health-status"
2022-07-21 20:38:04.548 +03:00 [INF] Request starting HTTP/1.1 GET https://localhost:44358/health-status - -
2022-07-21 20:38:04.897 +03:00 [INF] Executing endpoint 'Health checks'
2022-07-21 20:38:04.906 +03:00 [INF] Executed endpoint 'Health checks'
2022-07-21 20:38:04.906 +03:00 [INF] Received HTTP response headers after 359.4587ms - 200
2022-07-21 20:38:04.906 +03:00 [INF] End processing HTTP request after 359.674ms - 200
2022-07-21 20:38:04.909 +03:00 [INF] Request finished HTTP/1.1 GET https://localhost:44358/health-status - - - 200 - application/json 360.9457ms
2022-07-21 20:38:04.910 +03:00 [DBG] HealthReportCollector - health report execution history saved.
2022-07-21 20:38:04.910 +03:00 [DBG] HealthReport history already exists and is in the same state, updating the values.
2022-07-21 20:38:04.911 +03:00 [DBG] HealthReportCollector has completed.
2022-07-21 20:38:04.911 +03:00 [DBG] HealthCheck collector HostedService executed successfully.
**2022-07-21 20:38:13.051 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 16718**
2022-07-21 20:38:13.058 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - PART 3 - 6
2022-07-21 20:38:13.058 +03:00 [INF] STOPWATCH GetLocalizationConfigAsync() - 16834
2022-07-21 20:38:13.426 +03:00 [INF] STOPWATCH GetSettingConfigAsync() - 362
2022-07-21 20:38:13.838 +03:00 [INF] STOPWATCH GetAsync() - 18912
2022-07-21 20:38:13.838 +03:00 [INF] Executed AbpApplicationConfigurationAppService.GetAsync().
2022-07-21 20:38:13.852 +03:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
**2022-07-21 20:38:13.884 +03:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 18994.6453ms**

I have insert AbpApplicationConfigurationAppService where I insert some STOPWATCHs I have got ~19sec for AbpApplicationConfigurationAppService.GetAsync() and all other queries for backend has more time.

Why is it appear? What can I do with this problem?

Best regards, Advantiss Inc

I have tried to use redis, but I got to decrease performance

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
2022-07-06 22:01:21.840 +03:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
2022-07-06 22:01:22.573 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:FeatureManagement.ManageHostFeatures,pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:AbpIdentity.Roles,pn:U,pk:f164aa86-f536-867d-4c7f-3a........................................................
2022-07-06 22:01:22.651 +03:00 [DBG] Not found in the cache: pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:FeatureManagement.ManageHostFeatures,pn:U,pk:f164aa86-f536-867d-4c7f-3a049335a0ec,n:AbpI..................................................................
2022-07-06 22:01:22.671 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: U,f164aa86-f536-867d-4c7f-3a049335a0ec
2022-07-06 22:01:22.701 +03:00 [DBG] Setting the cache items. Count: 95
2022-07-06 22:01:22.798 +03:00 [DBG] Finished setting the cache items. Count: 95
2022-07-06 22:01:22.822 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Roles,pn:R,pk:admin,n:AbpIdentity.Roles.Create,pn:R,pk:admin,n:AbpIdentity.Roles.Update,pn:R,pk:admin...................................................................
2022-07-06 22:01:22.876 +03:00 [DBG] Not found in the cache: pn:R,pk:admin,n:FeatureManagement.ManageHostFeatures,pn:R,pk:admin,n:AbpIdentity.Roles,pn:R,pk:admin,n:AbpIdentity.Roles.Create,pn:R,pk:admin,n:AbpIdentity.Roles.Update,pn:R,pk:admin,...........................................................
2022-07-06 22:01:22.898 +03:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: R,admin
2022-07-06 22:01:22.929 +03:00 [DBG] Setting the cache items. Count: 95
2022-07-06 22:01:23.011 +03:00 [DBG] Finished setting the cache items. Count: 95
2022-07-06 22:01:23.023 +03:00 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Dibl_App,n:AbpIdentity.UserLookup
2022-07-06 22:01:23.064 +03:00 [DBG] Not found in the cache: pn:C,pk:Dibl_App,n:AbpIdentity.UserLookup
2022-07-06 22:01:23.072 +03:00 [DBG] Getting all granted permissions from the repository for this provider name,key: C,Dibl_App
2022-07-06 22:01:23.086 +03:00 [DBG] Setting the cache items. Count: 104
2022-07-06 22:01:23.199 +03:00 [DBG] Finished setting the cache items. Count: 104
2022-07-06 22:01:23.227 +03:00 [DBG] STOPWATCH ApplicationAuthConfigurationDto() - 1381
2022-07-06 22:01:23.235 +03:00 [DBG] STOPWATCH GetFeaturesConfigAsync() - 2
2022-07-06 22:01:23.324 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 1 - 84
2022-07-06 22:01:35.268 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 11939
2022-07-06 22:01:35.276 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 3 - 5
2022-07-06 22:01:35.279 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - 12039
2022-07-06 22:01:35.550 +03:00 [DBG] STOPWATCH GetSettingConfigAsync() - 262
2022-07-06 22:01:35.982 +03:00 [DBG] STOPWATCH GetAsync() - 14142
2022-07-06 22:01:35.985 +03:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
* **Steps to reproduce the issue**:"
Enable redis...

After that:
AbpApplicationConfigurationAppService.GetAsync() is executed about 12+ sec
And this method is called every refresh page.
I added some Stopwatch and got such results:
2022-07-06 22:01:35.268 +03:00 [DBG] STOPWATCH GetLocalizationConfigAsync() - PART 2 - 11939

Why does reading localization resources take this time? What can I do with this problem?

If I disable redis I will get: STOPWATCH GetAsync() - 2069, and this method is called once.

from code:

stopWatch1.Start();

foreach (var resource in _localizationOptions.Resources.Values)
{
    var dictionary = new Dictionary<string, string>();

    var localizer = _serviceProvider.GetRequiredService(
        typeof(IStringLocalizer<>).MakeGenericType(resource.ResourceType)
    ) as IStringLocalizer;

    foreach (var localizedString in localizer.GetAllStrings())
    {
        dictionary[localizedString.Name] = localizedString.Value;
    }

    localizationConfig.Values[resource.ResourceName] = dictionary;
}

Logger.LogDebug("STOPWATCH GetLocalizationConfigAsync() - PART 2 - " + stopWatch1.ElapsedMilliseconds);

Best regards, Advantiss Inc

User_1 get AntiforgeryValidationException, because cookie XSRF-TOKEN changed/removed after login User_2, but error message does not reflect real situation... Do you have any variants for solution this problem? Maybe, change error message or login User_1 with logout User_2?

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: [15:36:39 INF] Route matched with {page = "/Account/Login", action = "", controller = "", area = ""}. Executing page /Account/Login [15:36:39 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy [15:36:39 INF] Antiforgery token validation failed. The antiforgery cookie token and request token do not match. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery cookie token and request token do not match. at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateTokens(HttpContext httpContext, AntiforgeryTokenSet antiforgeryTokenSet) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateRequestAsync(HttpContext httpContext) at Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter.OnAuthorizationAsync(AuthorizationFilterContext context) [15:36:39 INF] Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.AutoValidateAntiforgeryTokenAuthorizationFilter'. [15:36:39 INF] Executing HttpStatusCodeResult, setting HTTP status code 400 [15:36:39 INF] Executed page /Account/Login in 142.0991ms [15:36:39 INF] Executed endpoint '/Account/Login'

  • Steps to reproduce the issue:" User 1 and User 2 try to login in one browser
  1. User 1: Open Login page
  2. User 2: Open Login Page, Authorization and return to main site
  3. User 1: Try to Authorization and get AntiforgeryValidationException error

Best regards, Advantiss Inc

Showing 1 to 8 of 8 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06