ABP version is 9.2.0
please let me know that whatever code you will going to share with me that i need to add in my all micorservices including sass and identity and auth and auditlogging
Hi,
We have identified and resolved the issue.
Investigation: As per your suggestion, we temporarily removed AbpCachingStackExchangeRedisModule from Administration service to test with in-memory cache.
After that change, the Administration service started calling: POST https://auth.activitylinker.com/api/account/dynamic-claims/refresh on every request. AuthServer returned 204 OK but Administration service threw: "Failed to refresh remote dynamic claims cache for user"
This was causing a continuous redirect loop on every page load.
Fix Applied: We set WebRemoteDynamicClaimsPrincipalContributorOptions.IsEnabled = false in TMSMSAdministrationServiceModule.cs:
public override void PreConfigureServices(ServiceConfigurationContext context) { PreConfigure<WebRemoteDynamicClaimsPrincipalContributorOptions>(options => { options.IsEnabled = false; }); }
After this change redirect loop stopped and login works correctly.
We have also sent you an email at liming.ma@volosoft.com from neel.m@technoheaven.net with the logs captured after removing AbpCachingStackExchangeRedisModule. Please check your email for the attached log file.
Questions:
Thanks, Neel Kotadia Techno Heaven
Hello, I have changed in a TMSMSAdministrationServiceModule.cs
but after this i am getting this issue.
[08:40:35 WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.
[08:40:35 DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
[08:40:35 DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
[08:40:35 INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
[08:40:35 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 66.8065ms
[08:40:35 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[08:40:35 INF] Request finished HTTP/1.1 GET http://adminserver/api/abp/application-configuration?includeLocalizationResources=false - 200 null application/json; charset=utf-8 100.208ms
[08:40:35 INF] Request starting HTTP/1.1 GET http://adminserver/api/abp/application-localization?cultureName=en&onlyDynamics=false - null null
[08:40:35 INF] CORS policy execution successful.
[08:40:35 DBG] Get dynamic claims cache for user: 0e3c4557-57fd-31b4-7781-3a1df656b05c
[08:40:35 DBG] Refresh dynamic claims for user: 0e3c4557-57fd-31b4-7781-3a1df656b05c from remote service.
[08:40:35 INF] Start processing HTTP request POST https://auth.activitylinker.com/api/account/dynamic-claims/refresh
[08:40:35 INF] Sending HTTP request POST https://auth.activitylinker.com/api/account/dynamic-claims/refresh
[08:40:35 INF] Received HTTP response headers after 23.7656ms - 204
[08:40:35 INF] End processing HTTP request after 23.8603ms - 204
[08:40:35 WRN] Failed to refresh remote dynamic claims cache for user: 0e3c4557-57fd-31b4-7781-3a1df656b05c
Volo.Abp.AbpException: Failed to refresh remote claims for user: 0e3c4557-57fd-31b4-7781-3a1df656b05c
at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorCacheBase1.GetAsync(Guid userId, Nullable1 tenantId)
at Volo.Abp.Security.Claims.RemoteDynamicClaimsPrincipalContributorBase2.ContributeAsync(AbpClaimsPrincipalContributorContext context) [08:40:35 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' [08:40:35 INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc).
[08:40:35 INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto'.
[08:40:35 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 6.8293ms
[08:40:35 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[08:40:35 INF] Request finished HTTP/1.1 GET http://adminserver/api/abp/application-localization?cultureName=en&onlyDynamics=false - 200 null application/json; charset=utf-8 34.1723ms
[08:40:37 DBG] Executing HealthCheck collector HostedService.
[08:40:37 INF] Start processing HTTP request GET http://[::]/health-status
[08:40:37 INF] Sending HTTP request GET http://[::]/health-status
[08:40:37 ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name AdministrationService Health Status.
System.Net.Http.HttpRequestException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName') ([::]:80)
---> System.ArgumentException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')
at System.Net.Dns.GetHostEntryOrAddressesCoreAsync(String hostName, Boolean justReturnParsedIp, Boolean throwOnIIPAny, Boolean justAddresses, AddressFamily family, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e, Boolean userSocket, Boolean saeaCancelable)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ConnectAsync(Socket socket, Boolean saeaCancelable)
at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
Hello,
We have sent the full Administration service debug logs to your email (liming.ma@volosoft.com) from neel.m@technoheaven.net with the subject "Slow response time of application-configuration during login".
Please check the email for the attached logs.
Thanks, Neel Kotadia
But on every time on page load also this call takes 2-3 secs
We already Run the Migrations for Both PostGres service and MongoDb Service. Also there is no option to provide permissions for role or user and also not appear in the database.
We also take reference from community post and also check sample code given in repository, but it did not helped me in sorting this out.
So help me.