Ok, in this case we will wait for the new version.(8.2.1) Can you refund ticket ? Thanks
In our project, we were using MSSQL Server 2012 for the Hangfire database. However, with ABP 8.2.0, Hangfire 1.8.14 NuGet package is being used. Although we tried to set SetDataCompatibilityLevel(110) with Hangfire 1.8.14, we encountered an error. We then tried using Redis but faced the this issue. Could this problem(MSSQL Server 2012 for the Hangfire database) be resolved in the new version of ABP?
Our project is tiered. Which project will we add this code?
We use redis for hangfire database ; we add HttpApi.Host project this code
private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration) { string redisConfig = configuration["Redis:HangfireRedis"].ToString();
context.Services.AddHangfire(config =>
{
config.UseRedisStorage(redisConfig, new RedisStorageOptions()
{
Prefix = "hangfire:app1:",
Db = 8,
});
//config.UseRecurringJobAdmin(typeof(StartupBase).Assembly;
});
context.Services.AddHangfireServer(options =>
{
options.ServerName = "EnzimWeb";
});
}
But we get error
2024-07-04 16:34:28.486 +03:00 [FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.AuditLogging.AbpAuditLoggingApplicationModule, Volo.Abp.AuditLogging.Application, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null: Cannot convert period: 86400000 to cron expression, use HangfireBackgroundWorkerBase to define worker. See the inner exception for details. ---> Volo.Abp.AbpException: Cannot convert period: 86400000 to cron expression, use HangfireBackgroundWorkerBase to define worker at Volo.Abp.BackgroundWorkers.Hangfire.HangfireBackgroundWorkerManager.GetCron(Int32 period) at Volo.Abp.BackgroundWorkers.Hangfire.HangfireBackgroundWorkerManager.AddAsync(IBackgroundWorker worker, CancellationToken cancellationToken) at Volo.Abp.AuditLogging.AbpAuditLoggingApplicationModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.InitializeAsync(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplicationAsync(IApplicationBuilder app) at EnzimWeb.Program.Main(String[] args) in F:\azure\enzimiber\src\EnzimWeb.HttpApi.Host\Program.cs:line 38
thanks you. it works fine I implment similiar code but I will use your code .
I implement this code. But your code is more than smart to my code //string returnUrl = httpContext.Request.Path.ToString() + httpContext.Request.QueryString.ToString(); //if(returnUrl != null && returnUrl != "/") //httpContext.Response.Redirect("/account/login?returnUrl=" + returnUrl); //else //httpContext.Response.Redirect("/account/login");
My page is dynamic. for example : https://subdonamin.domain.com/crm-aday-details?adayId=4503#0 My scenario ;
we get reference from this ticket https://support.abp.io/QA/Questions/5206/Blazor-Server---Force-Authentication-For-Root--Entire-Site
Hi ; we redirect non-login user to login page with tihs code. how can we transport return url with this code
app.Use(async (httpContext, next) =>
{
if (!httpContext.Request.Path.ToString().Contains("account/login"))
{
if (httpContext.User.Identity is not { IsAuthenticated: true })
{
httpContext.Response.Redirect("/account/login");
return;
}
}
await next();
});
Hi.Actually request did not shown on logs. But i share it anyway https://we.tl/t-wdky8sp5FI
hi. We developed abp.io project with Blazor server UI. can you share with us Blazor server sample.