aspnetboilerplate: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked.
Abp Version:3.6.2 .Net Core Version:2.1.0 Ef Core Version:2.1
When I upgrade to .net core 2.1, after the user login in, idle for a period of time (without any operation and not close browser), it will throw the following error:
InvalidOperationException: Navigation property 'Claims' on entity of type 'User' cannot be loaded because the entity is not being tracked. Navigation properties can only be loaded for tracked entities.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (12 by maintainers)
Commits related to this issue
- #3461 Added test to resolve AbpSecurityStampValidator — committed to aspnetboilerplate/aspnetboilerplate by hikalkan 6 years ago
Identity 2.1 made some changes. It re-registered with ISecurityStampValidator
AddSignInManagerDeps
It covers AddAbpSecurityStampValidator<UserSecurityStampValidator>()
So only need to change the registration order can be solved.
Hi,
This is happening for us also after upgrade from 3.5.x to 3.7. We are using Kesteral hosting, so anything to do with IIS recycling can be discounted. (we are still in development only)
What i have found solves the problem is to delete all cookies and restart the browser, at this point you are asked to log in again, and all is well-- clearly not a production solution.
Will update if i learn more about how to reproduce.
my ef.core project csproj file content:
My Web project csproj file Content: