Activities of "Rrader30"

Answer

Identity Logs

2022-01-04 07:58:07.652 -05:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2022-01-04 07:58:07.655 -05:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 135.2663ms 2022-01-04 07:58:07.655 -05:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)' 2022-01-04 07:58:07.656 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Abp/ServiceProxyScript - - - 200 1936 application/javascript 168.4632ms 2022-01-04 07:58:07.689 -05:00 [DBG] PermissionStore.GetCacheItemAsync: pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.ManagePermissions,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.ManagePermissions,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Impersonation,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageOU,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageRoles,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageMembers,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.SettingManagement,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.SecurityLogs 2022-01-04 07:58:07.709 -05:00 [DBG] Not found in the cache: pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Roles.ManagePermissions,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.ManagePermissions,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.Users.Impersonation,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageOU,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageRoles,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.OrganizationUnits.ManageMembers,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Create,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Update,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.ClaimTypes.Delete,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.SettingManagement,pn:U,pk:51464bf4-f1cb-779d-6252-3a00b739cc3a,n:AbpIdentity.SecurityLogs 2022-01-04 07:58:07.717 -05:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: U,51464bf4-f1cb-779d-6252-3a00b739cc3a 2022-01-04 07:58:07.824 -05:00 [DBG] Setting the cache items. Count: 21 2022-01-04 07:58:07.832 -05:00 [DBG] Finished setting the cache items. Count: 21 2022-01-04 07:58:07.842 -05:00 [DBG] PermissionStore.GetCacheItemAsync: 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,n:AbpIdentity.Roles.Delete,pn:R,pk:admin,n:AbpIdentity.Roles.ManagePermissions,pn:R,pk:admin,n:AbpIdentity.Users,pn:R,pk:admin,n:AbpIdentity.Users.Create,pn:R,pk:admin,n:AbpIdentity.Users.Update,pn:R,pk:admin,n:AbpIdentity.Users.Delete,pn:R,pk:admin,n:AbpIdentity.Users.ManagePermissions,pn:R,pk:admin,n:AbpIdentity.Users.Impersonation,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageOU,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageRoles,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageMembers,pn:R,pk:admin,n:AbpIdentity.ClaimTypes,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Create,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Update,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Delete,pn:R,pk:admin,n:AbpIdentity.SettingManagement,pn:R,pk:admin,n:AbpIdentity.SecurityLogs 2022-01-04 07:58:07.843 -05:00 [DBG] Not found in the cache: 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,n:AbpIdentity.Roles.Delete,pn:R,pk:admin,n:AbpIdentity.Roles.ManagePermissions,pn:R,pk:admin,n:AbpIdentity.Users,pn:R,pk:admin,n:AbpIdentity.Users.Create,pn:R,pk:admin,n:AbpIdentity.Users.Update,pn:R,pk:admin,n:AbpIdentity.Users.Delete,pn:R,pk:admin,n:AbpIdentity.Users.ManagePermissions,pn:R,pk:admin,n:AbpIdentity.Users.Impersonation,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageOU,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageRoles,pn:R,pk:admin,n:AbpIdentity.OrganizationUnits.ManageMembers,pn:R,pk:admin,n:AbpIdentity.ClaimTypes,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Create,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Update,pn:R,pk:admin,n:AbpIdentity.ClaimTypes.Delete,pn:R,pk:admin,n:AbpIdentity.SettingManagement,pn:R,pk:admin,n:AbpIdentity.SecurityLogs 2022-01-04 07:58:07.843 -05:00 [DBG] Getting not cache granted permissions from the repository for this provider name,key: R,admin 2022-01-04 07:58:07.928 -05:00 [DBG] Setting the cache items. Count: 21 2022-01-04 07:58:07.931 -05:00 [DBG] Finished setting the cache items. Count: 21 2022-01-04 07:58:10.015 -05:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync(). 2022-01-04 07:58:10.045 -05:00 [DBG] Added 0 entity changes to the current audit log 2022-01-04 07:58:10.048 -05:00 [DBG] Added 0 entity changes to the current audit log 2022-01-04 07:58:10.049 -05:00 [DBG] Added 0 entity changes to the current audit log 2022-01-04 07:58:10.054 -05:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2022-01-04 07:58:10.056 -05:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 2551.3292ms 2022-01-04 07:58:10.056 -05:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2022-01-04 07:58:10.066 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Abp/ApplicationConfigurationScript - - - 200 169626 application/javascript 2578.9570ms 2022-01-04 07:58:10.073 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/backgrounds/bg-transparent.png - - 2022-01-04 07:58:10.073 -05:00 [INF] The file /Themes/Lepton/Global/assets/backgrounds/bg-transparent.png was not modified 2022-01-04 07:58:10.073 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/backgrounds/bg-transparent.png - - - 304 - image/png 0.7164ms 2022-01-04 07:58:10.090 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-regular.woff2 - - 2022-01-04 07:58:10.090 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-600.woff2 - - 2022-01-04 07:58:10.091 -05:00 [INF] The file /Themes/Lepton/Global/assets/fonts/poppins-v6-latin-regular.woff2 was not modified 2022-01-04 07:58:10.091 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-regular.woff2 - - - 304 - font/woff2 0.8096ms 2022-01-04 07:58:10.091 -05:00 [INF] The file /Themes/Lepton/Global/assets/fonts/poppins-v6-latin-600.woff2 was not modified 2022-01-04 07:58:10.091 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-600.woff2 - - - 304 - font/woff2 0.5976ms 2022-01-04 07:58:10.093 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-700.woff2 - - 2022-01-04 07:58:10.094 -05:00 [INF] The file /Themes/Lepton/Global/assets/fonts/poppins-v6-latin-700.woff2 was not modified 2022-01-04 07:58:10.094 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44365/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-700.woff2 - - - 304 - font/woff2 0.7653ms 2022-01-04 07:58:15.178 -05:00 [DBG] 1 recurring job(s) processed by scheduler. 2022-01-04 07:58:20.150 -05:00 [DBG] Server desktop-2dfljpm:26060:ae790677 heartbeat successfully sent 2022-01-04 07:58:50.240 -05:00 [DBG] Server desktop-2dfljpm:26060:ae790677 heartbeat successfully sent 2022-01-04 07:59:20.292 -05:00 [DBG] Server desktop-2dfljpm:26060:ae790677 heartbeat successfully sent 2022-01-04 07:59:50.349 -05:00 [DBG] Server desktop-2dfljpm:26060:ae790677 heartbeat successfully sent

Answer

Here is the log for Host.API

2022-01-04 07:59:05.244 -05:00 [DBG] Added 0 entity changes to the current audit log 2022-01-04 07:59:05.245 -05:00 [INF] Executed endpoint 'Health checks' 2022-01-04 07:59:05.245 -05:00 [DBG] Added 0 entity changes to the current audit log 2022-01-04 07:59:05.245 -05:00 [INF] Received HTTP response headers after 55.7843ms - 200 2022-01-04 07:59:05.245 -05:00 [INF] End processing HTTP request after 55.8595ms - 200 2022-01-04 07:59:05.246 -05:00 [INF] Request finished HTTP/1.1 GET https://localhost:44350/health-status - - - 200 - application/json 51.4686ms 2022-01-04 07:59:05.247 -05:00 [DBG] HealthReportCollector - health report execution history saved. 2022-01-04 07:59:05.247 -05:00 [DBG] HealthReport history already exists and is in the same state, updating the values. 2022-01-04 07:59:05.247 -05:00 [INF] Saved 2 entities to in-memory store. 2022-01-04 07:59:05.248 -05:00 [DBG] HealthReportCollector has completed. 2022-01-04 07:59:05.248 -05:00 [DBG] HealthCheck collector HostedService executed successfully. 2022-01-04 07:59:05.329 -05:00 [INF] Entity Framework Core 6.0.1 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery 2022-01-04 07:59:05.800 -05:00 [INF] Executed DbCommand (471ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount] FROM [AbpBackgroundJobs] AS [a] WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0) ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime] 2022-01-04 07:59:10.811 -05:00 [INF] Entity Framework Core 6.0.1 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery 2022-01-04 07:59:11.015 -05:00 [INF] Executed DbCommand (203ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount] FROM [AbpBackgroundJobs] AS [a] WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0) ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime] 2022-01-04 07:59:13.215 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44350/hangfire - - 2022-01-04 07:59:13.241 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44350/hangfire - - - 401 - - 26.1707ms 2022-01-04 07:59:13.816 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44350/hangfire - - 2022-01-04 07:59:13.818 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44350/hangfire - - - 401 - - 2.4026ms 2022-01-04 07:59:15.252 -05:00 [DBG] Executing HealthCheck collector HostedService. 2022-01-04 07:59:15.253 -05:00 [INF] Entity Framework Core 6.0.1 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory:6.0.0' with options: StoreName=HealthChecksUI 2022-01-04 07:59:15.253 -05:00 [INF] Start processing HTTP request GET "https://localhost:44350/health-status" 2022-01-04 07:59:15.253 -05:00 [INF] Sending HTTP request GET "https://localhost:44350/health-status" 2022-01-04 07:59:15.254 -05:00 [INF] Request starting HTTP/1.1 GET https://localhost:44350/health-status - - 2022-01-04 07:59:15.256 -05:00 [INF] Executing endpoint 'Health checks' 2022-01-04 07:59:15.258 -05:00 [INF] Entity Framework Core 6.0.1 initialized 'TiberVendorDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery 2022-01-04 07:59:15.874 -05:00 [INF] Executed DbCommand (614ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean), @__p_0='?' (DbType = Int32), @__p_1='?' (DbType = Int32)], CommandType='"Text"', CommandTimeout='30'] SELECT [a].[Id], [a].[ConcurrencyStamp], [a].[ExtraProperties], [a].[IsDefault], [a].[IsPublic], [a].[IsStatic], [a].[Name], [a].[NormalizedName], [a].[TenantId] FROM [AbpRoles] AS [a] WHERE (@__ef_filter__p_0 = CAST(1 AS bit)) OR [a].[TenantId] IS NULL ORDER BY [a].[Id] OFFSET @__p_0 ROWS FETCH NEXT @__p_1 ROWS ONLY

Answer

So I created the client

When I navigate to https://localhost:44365/home/login

Answer

When I try I am getting

500 Internal Server Error UNAUTHORIZED_CLIENT Unknown client or client not enabled

Answer

I am still getting the 401 error. I tried logging into the angular frontend and also authenticating within swagger

2021-12-30 10:36:25.141 -05:00 [DBG] HealthReportCollector has completed. 2021-12-30 10:36:25.141 -05:00 [DBG] HealthCheck collector HostedService executed successfully. 2021-12-30 10:36:29.735 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44350/hangfire - - 2021-12-30 10:36:29.759 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44350/hangfire - - - 401 - - 23.9740ms 2021-12-30 10:36:29.865 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44350/hangfire - - 2021-12-30 10:36:29.868 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44350/hangfire - - - 401 - - 2.4635ms

Answer

I tried coping the code and I seem to still have an issue. How should we authenticate to get this to work?

Answer

So I copied the code over and debugged. It appears that the issue is in the IsLoggedIn. It continues to return false. I have validated that in the Angular App I am logged in and I have tried to authenticate via Swagger. Regardless of what I do it always returns false. Should I be authenticating in a different way?

private static bool IsLoggedIn(DashboardContext context, bool enableTenant) { var currentUser = context.GetHttpContext().RequestServices.GetRequiredService<ICurrentUser>();

        if (!enableTenant)
        {
            return currentUser.IsAuthenticated && !currentUser.TenantId.HasValue;
        }

        return currentUser.IsAuthenticated;
    }
Answer

So I tried this and I am getting 401 error on the /hangfire url

here is the log

2021-12-27 20:48:33.611 -05:00 [DBG] Added 0 entity changes to the current audit log 2021-12-27 20:48:33.612 -05:00 [INF] Executed endpoint 'Health checks' 2021-12-27 20:48:33.612 -05:00 [DBG] Added 0 entity changes to the current audit log 2021-12-27 20:48:33.612 -05:00 [INF] Received HTTP response headers after 14.962ms - 200 2021-12-27 20:48:33.612 -05:00 [INF] End processing HTTP request after 15.1008ms - 200 2021-12-27 20:48:33.612 -05:00 [INF] Request finished HTTP/1.1 GET https://localhost:44350/health-status - - - 200 - application/json 11.1714ms 2021-12-27 20:48:33.620 -05:00 [DBG] HealthReportCollector - health report execution history saved. 2021-12-27 20:48:33.620 -05:00 [DBG] HealthReport history already exists and is in the same state, updating the values. 2021-12-27 20:48:33.623 -05:00 [INF] Saved 2 entities to in-memory store. 2021-12-27 20:48:33.623 -05:00 [DBG] HealthReportCollector has completed. 2021-12-27 20:48:33.623 -05:00 [DBG] HealthCheck collector HostedService executed successfully. 2021-12-27 20:48:35.727 -05:00 [INF] Request starting HTTP/2 GET https://localhost:44350/hangfire - - 2021-12-27 20:48:35.752 -05:00 [INF] Request finished HTTP/2 GET https://localhost:44350/hangfire - - - 401 - - 24.8275ms 2021-12-27 20:48:38.551 -05:00 [INF] Entity Framework Core 6.0.1 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery 2021-12-27 20:48:38.553 -05:00 [INF] Executed DbCommand (2ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='"Text"', CommandTimeout='30'] SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount] FROM [AbpBackgroundJobs] AS [a] WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0) ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime]

Here is my code

using System; using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.AspNetCore.Authentication.Google; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.MicrosoftAccount; using Microsoft.AspNetCore.Authentication.Twitter; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using TiberVendor.EntityFrameworkCore; using TiberVendor.MultiTenancy; using StackExchange.Redis; using Microsoft.OpenApi.Models; using TiberVendor.HealthChecks; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; using Volo.Abp.Caching; using Volo.Abp.Identity.AspNetCore; using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.VirtualFileSystem; using Volo.Abp.BackgroundJobs.Hangfire; using Hangfire; using Volo.Chat; using Volo.Abp.Hangfire;

namespace TiberVendor { [DependsOn( typeof(TiberVendorHttpApiModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpIdentityAspNetCoreModule), typeof(TiberVendorApplicationModule), typeof(TiberVendorEntityFrameworkCoreModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpBackgroundJobsHangfireModule) )] [DependsOn(typeof(ChatSignalRModule))] public class TiberVendorHttpApiHostModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); var hostingEnvironment = context.Services.GetHostingEnvironment();

        ConfigureUrls(configuration);
        ConfigureConventionalControllers();
        ConfigureAuthentication(context, configuration);
        ConfigureSwagger(context, configuration);
        ConfigureCache(configuration);
        ConfigureVirtualFileSystem(context);
        ConfigureRedis(context, configuration, hostingEnvironment);
        ConfigureCors(context, configuration);
        ConfigureExternalProviders(context);
        ConfigureHealthChecks(context);
        ConfigureHangfire(context, configuration);
    }

    private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddHangfire(config =&gt;
        {
            config.UseSqlServerStorage(configuration.GetConnectionString("Default"));
        });
    }

    private void ConfigureHealthChecks(ServiceConfigurationContext context)
    {
        context.Services.AddTiberVendorHealthChecks();
    }

    private void ConfigureUrls(IConfiguration configuration)
    {
        Configure&lt;AppUrlOptions&gt;(options =>
        {
            options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"];
            options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
            options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation";
        });
    }

    private void ConfigureCache(IConfiguration configuration)
    {
        Configure&lt;AbpDistributedCacheOptions&gt;(options =>
        {
            options.KeyPrefix = "TiberVendor:";
        });
    }

    private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
    {
        var hostingEnvironment = context.Services.GetHostingEnvironment();

        if (hostingEnvironment.IsDevelopment())
        {
            Configure&lt;AbpVirtualFileSystemOptions&gt;(options =>
            {
                options.FileSets.ReplaceEmbeddedByPhysical&lt;TiberVendorDomainSharedModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Domain.Shared", Path.DirectorySeparatorChar)));
                options.FileSets.ReplaceEmbeddedByPhysical&lt;TiberVendorDomainModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Domain", Path.DirectorySeparatorChar)));
                options.FileSets.ReplaceEmbeddedByPhysical&lt;TiberVendorApplicationContractsModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Application.Contracts", Path.DirectorySeparatorChar)));
                options.FileSets.ReplaceEmbeddedByPhysical&lt;TiberVendorApplicationModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Application", Path.DirectorySeparatorChar)));
                options.FileSets.ReplaceEmbeddedByPhysical&lt;TiberVendorHttpApiModule&gt;(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.HttpApi", Path.DirectorySeparatorChar)));
            });
        }
    }

    private void ConfigureConventionalControllers()
    {
        Configure&lt;AbpAspNetCoreMvcOptions&gt;(options =>
        {
            options.ConventionalControllers.Create(typeof(TiberVendorApplicationModule).Assembly);
        });
    }

    private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
            .AddJwtBearer(options =>
            {
                options.Authority = configuration["AuthServer:Authority"];
                options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
                options.Audience = "TiberVendor";
            });
    }

    private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddAbpSwaggerGenWithOAuth(
            configuration["AuthServer:Authority"],
            new Dictionary&lt;string, string&gt;
            {
                {"TiberVendor", "TiberVendor API"}
            },
            options =>
            {
                options.SwaggerDoc("v1", new OpenApiInfo {Title = "TiberVendor API", Version = "v1"});
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.FullName);
            });
    }

    private void ConfigureRedis(
        ServiceConfigurationContext context,
        IConfiguration configuration,
        IWebHostEnvironment hostingEnvironment)
    {
        if (!hostingEnvironment.IsDevelopment())
        {
            var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
            context.Services
                .AddDataProtection()
                .PersistKeysToStackExchangeRedis(redis, "TiberVendor-Protection-Keys");
        }
    }

    private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddCors(options =>
        {
            options.AddDefaultPolicy(builder =>
            {
                builder
                    .WithOrigins(
                        configuration["App:CorsOrigins"]
                            .Split(",", StringSplitOptions.RemoveEmptyEntries)
                            .Select(o => o.Trim().RemovePostFix("/"))
                            .ToArray()
                    )
                    .WithAbpExposedHeaders()
                    .SetIsOriginAllowedToAllowWildcardSubdomains()
                    .AllowAnyHeader()
                    .AllowAnyMethod()
                    .AllowCredentials();
            });
        });
    }

    private void ConfigureExternalProviders(ServiceConfigurationContext context)
    {
        context.Services
            .AddDynamicExternalLoginProviderOptions&lt;GoogleOptions&gt;(
                GoogleDefaults.AuthenticationScheme,
                options =>
                {
                    options.WithProperty(x => x.ClientId);
                    options.WithProperty(x => x.ClientSecret, isSecret: true);
                }
            )
            .AddDynamicExternalLoginProviderOptions&lt;MicrosoftAccountOptions&gt;(
                MicrosoftAccountDefaults.AuthenticationScheme,
                options =>
                {
                    options.WithProperty(x => x.ClientId);
                    options.WithProperty(x => x.ClientSecret, isSecret: true);
                }
            )
            .AddDynamicExternalLoginProviderOptions&lt;TwitterOptions&gt;(
                TwitterDefaults.AuthenticationScheme,
                options =>
                {
                    options.WithProperty(x => x.ConsumerKey);
                    options.WithProperty(x => x.ConsumerSecret, isSecret: true);
                }
            );
    }

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        var env = context.GetEnvironment();

        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.UseAbpRequestLocalization();

        if (!env.IsDevelopment())
        {
            app.UseErrorPage();
        }

        app.UseStaticFiles();
        app.UseRouting();
        app.UseCors();
        app.UseAuthentication();
        
        if (MultiTenancyConsts.IsEnabled)
        {
            app.UseMultiTenancy();
        }

        app.UseAuthorization();
        app.UseHangfireDashboard("/hangfire", new DashboardOptions
        {
            AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter(requiredPermissionName: "hangfirePerm") }
        });

        app.UseSwagger();
        app.UseAbpSwaggerUI(options =>
        {
           options.SwaggerEndpoint("/swagger/v1/swagger.json", "TiberVendor API");

           var configuration = context.GetConfiguration();
           options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
           options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
        });
        app.UseAuditing();
        app.UseAbpSerilogEnrichers();
        app.UseUnitOfWork();
        app.UseConfiguredEndpoints();
        //app.UseHangfireDashboard();
        
    }
}

}

Answer

All configuration is in the HttpApiHostModule.cs in the HttpApi.Host project

using System; using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.AspNetCore.Authentication.Google; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.MicrosoftAccount; using Microsoft.AspNetCore.Authentication.Twitter; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Caching.StackExchangeRedis; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using TiberVendor.EntityFrameworkCore; using TiberVendor.MultiTenancy; using StackExchange.Redis; using Microsoft.OpenApi.Models; using TiberVendor.HealthChecks; using Volo.Abp.Caching.StackExchangeRedis; using Volo.Abp; using Volo.Abp.Account; using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.Autofac; using Volo.Abp.Caching; using Volo.Abp.Identity.AspNetCore; using Volo.Abp.Modularity; using Volo.Abp.Swashbuckle; using Volo.Abp.UI.Navigation.Urls; using Volo.Abp.VirtualFileSystem; using Volo.Abp.BackgroundJobs.Hangfire; using Hangfire; using Volo.Chat; using Volo.Abp.Hangfire; namespace TiberVendor { [DependsOn( typeof(TiberVendorHttpApiModule), typeof(AbpAutofacModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpIdentityAspNetCoreModule), typeof(TiberVendorApplicationModule), typeof(TiberVendorEntityFrameworkCoreModule), typeof(AbpSwashbuckleModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpBackgroundJobsHangfireModule) )] [DependsOn(typeof(ChatSignalRModule))] public class TiberVendorHttpApiHostModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); var hostingEnvironment = context.Services.GetHostingEnvironment(); ConfigureUrls(configuration); ConfigureConventionalControllers(); ConfigureAuthentication(context, configuration); ConfigureSwagger(context, configuration); ConfigureCache(configuration); ConfigureVirtualFileSystem(context); ConfigureRedis(context, configuration, hostingEnvironment); ConfigureCors(context, configuration); ConfigureExternalProviders(context); ConfigureHealthChecks(context); ConfigureHangfire(context, configuration); } private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddHangfire(config => { config.UseSqlServerStorage(configuration.GetConnectionString("Default")); }); } private void ConfigureHealthChecks(ServiceConfigurationContext context) { context.Services.AddTiberVendorHealthChecks(); } private void ConfigureUrls(IConfiguration configuration) { Configure<AppUrlOptions>(options => { options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"]; options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password"; options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation"; }); } private void ConfigureCache(IConfiguration configuration) { Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "TiberVendor:"; }); } private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) { var hostingEnvironment = context.Services.GetHostingEnvironment(); if (hostingEnvironment.IsDevelopment()) { Configure<AbpVirtualFileSystemOptions>(options => { options.FileSets.ReplaceEmbeddedByPhysical<TiberVendorDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Domain.Shared", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<TiberVendorDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Domain", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<TiberVendorApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Application.Contracts", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<TiberVendorApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.Application", Path.DirectorySeparatorChar))); options.FileSets.ReplaceEmbeddedByPhysical<TiberVendorHttpApiModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}TiberVendor.HttpApi", Path.DirectorySeparatorChar))); }); } } private void ConfigureConventionalControllers() { Configure<AbpAspNetCoreMvcOptions>(options => { options.ConventionalControllers.Create(typeof(TiberVendorApplicationModule).Assembly); }); } private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => { options.Authority = configuration["AuthServer:Authority"]; options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); options.Audience = "TiberVendor"; }); } private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddAbpSwaggerGenWithOAuth( configuration["AuthServer:Authority"], new Dictionary<string, string> { {"TiberVendor", "TiberVendor API"} }, options => { options.SwaggerDoc("v1", new OpenApiInfo {Title = "TiberVendor API", Version = "v1"}); options.DocInclusionPredicate((docName, description) => true); options.CustomSchemaIds(type => type.FullName); }); } private void ConfigureRedis( ServiceConfigurationContext context, IConfiguration configuration, IWebHostEnvironment hostingEnvironment) { if (!hostingEnvironment.IsDevelopment()) { var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); context.Services .AddDataProtection() .PersistKeysToStackExchangeRedis(redis, "TiberVendor-Protection-Keys"); } } private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddCors(options => { options.AddDefaultPolicy(builder => { builder .WithOrigins( configuration["App:CorsOrigins"] .Split(",", StringSplitOptions.RemoveEmptyEntries) .Select(o => o.Trim().RemovePostFix("/")) .ToArray() ) .WithAbpExposedHeaders() .SetIsOriginAllowedToAllowWildcardSubdomains() .AllowAnyHeader() .AllowAnyMethod() .AllowCredentials(); }); }); } private void ConfigureExternalProviders(ServiceConfigurationContext context) { context.Services .AddDynamicExternalLoginProviderOptions<GoogleOptions>( GoogleDefaults.AuthenticationScheme, options => { options.WithProperty(x => x.ClientId); options.WithProperty(x => x.ClientSecret, isSecret: true); } ) .AddDynamicExternalLoginProviderOptions<MicrosoftAccountOptions>( MicrosoftAccountDefaults.AuthenticationScheme, options => { options.WithProperty(x => x.ClientId); options.WithProperty(x => x.ClientSecret, isSecret: true); } ) .AddDynamicExternalLoginProviderOptions<TwitterOptions>( TwitterDefaults.AuthenticationScheme, options => { options.WithProperty(x => x.ConsumerKey); options.WithProperty(x => x.ConsumerSecret, isSecret: true); } ); } public override void OnApplicationInitialization(ApplicationInitializationContext context) { var app = context.GetApplicationBuilder(); var env = context.GetEnvironment(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseAbpRequestLocalization(); if (!env.IsDevelopment()) { app.UseErrorPage(); } app.UseStaticFiles(); app.UseRouting(); app.UseCors(); app.UseAuthentication(); if (MultiTenancyConsts.IsEnabled) { app.UseMultiTenancy(); } app.UseAuthorization(); app.UseSwagger(); app.UseAbpSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "TiberVendor API"); var configuration = context.GetConfiguration(); options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]); }); app.UseAuditing(); app.UseAbpSerilogEnrichers(); app.UseUnitOfWork(); app.UseConfiguredEndpoints(); app.UseHangfireDashboard(); //app.UseHangfireDashboard("/hangfire",new DashboardOptions //{ // AsyncAuthorization = new[] { new AbpHangfireAuthorizationFilter(requiredPermissionName: "hangfirePerm") } //}); } } }

Answer

I seen this and tried following it. When I define the parameters for using authorization the hangfire url stops working but not supplying parameters everything works

Showing 11 to 20 of 44 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33