ASP<span></span>.NET Core provides cookie middleware which serializes a user principal into an encrypted cookie and then, on subsequent requests, validates the cookie, recreates the principal and assigns it to the
User
property onHttpContext
.
References:
AbpSession.TenantId
can be trusted.
TenantId
of user should not change.
Also, ABP has built-in tenant data filters: https://aspnetboilerplate.com/Pages/Documents/Data-Filters#imusthavetenant
It gets a tracked instance from the database, so it hits the database.
Entity instances are not (and probably should not be) cached directly.
By the way, ASP<span></span>.NET Boilerplate is open source: https://github.com/aspnetboilerplate/aspnetboilerplate
They serve very different purposes.
AbpSession.ToUserIdentifier()
gets an instance of UserIdentifier
based solely on the values in the claims.
UserManager.FindByIdAsync(...)
gets a tracked instance of User
from the database.
You need to [DependsOn(...)]
the module.
Check the culture specified in the files in the ProjectNameExtended folder.
Fixed by aspnetzero/aspnet-zero-core#2300.
From https://aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers#disabling-job-execution:
<blockquote>
public class MyProjectWebModule : AbpModule
{
public override void PreInitialize()
{
Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
}
//...
}
</blockquote>
Do you mean multiple instances?
An important point to note is that there should only be one instance consuming background jobs at any time.