ok, you can clear the data from the AbpLanguages
table.
Then, remove languages from all projects.
PostConfigure<AbpLocalizationOptions>(options =>
{
options.Languages.Remove..
});
hi
Try to remove the languages from AbpLocalizationOptions
PostConfigure<AbpLocalizationOptions>(options =>
{
options.Languages.Remove..
});
hi
Try to add UnitOfWork
attribute to DoWorkAsync
method or begin a new UOW
[UnitOfWork]
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
}
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
try
{
using (var uow = _unitOfWorkManager.Begin(requiresNew: true))
{
await uow.CompleteAsync();
}
}
}
hi
I removed your Dropbox download link. I will check your app.
Thanks.
hi
You don't need to use timezone in your database. The abp framework automatically handles time in the database and application.
It will convert the datetime to UTC when storing it in the database. After reading, it will convert it to UTC. The application/UI will convert it to the user's timezone.
Thanks.
hi
Start all microservices, and the database will migrate automatically.
Can you share the logs.txt file in AdministrationService
?
public override async Task OnPreApplicationInitializationAsync(ApplicationInitializationContext context)
{
using var scope = context.ServiceProvider.CreateScope();
await MigrateDatabase(scope.ServiceProvider);
}
private static async Task MigrateDatabase(IServiceProvider serviceProvider)
{
await serviceProvider
.GetRequiredService<AdministrationServiceRuntimeDatabaseMigrator>()
.CheckAndApplyDatabaseMigrationsAsync();
await serviceProvider
.GetRequiredService<BlobStoringRuntimeDatabaseMigrator>()
.CheckAndApplyDatabaseMigrationsAsync();
}
Thanks.
The log you share contains connection string errors, the token's audit is invalid, etc.
Is your connection string correct?
Can you share the HTTP request info from Swagger?
Thanks.
hi
You can add the redirect code in the Index page. This is easiest
public ActionResult Index()
{
if (CurrentUser.IsAuthenticated && CurrentUser.Roles.Contains("ContentManager"))
{
return Redirect("~/ManagerRequests");
}
return Page();
}
You can also do it in the OnSignedIn
method.
context.Services.ConfigureApplicationCookie(options =>
{
var previousOnSignedIn = options.Events.OnSignedIn;
options.Events.OnSignedIn = async cookieSignedInContext =>
{
await previousOnSignedIn(cookieSignedInContext);
var currentUser = cookieSignedInContext.HttpContext.RequestServices.GetRequiredService<ICurrentUser>();
if (currentUser.IsAuthenticated && currentUser.Roles.Contains("ContentManager"))
{
cookieSignedInContext.HttpContext.Response.Redirect("api/account/authenticator-info");
}
};
});
}