Closed greerde closed 9 years ago
It seems to me that you are describing this issue: CodePlex #2508 GetClaimsAsync() invoked on every request after identity was regenerated.
It is an unintended regression we introduced in cookie validation in Identity 2.2. We should be releasing a patch with the fix soon.
Is there any update on this? @suhasj @rustd
I just updated to the latest and greatest Identity Nuget packages. I am setting getting very high query counts with most being repeats.
@divega
Gitthub is for identity 3+, please dicuss Identity 2.x issues on codeplex
This was fixed in ASP.NET Identity 2.2.1 Please make sure you are using the latest version and open an issue on http://aspnetidentity.codeplex.com/ if it still reproes for you
I was using Glimpse to check up on the performance of a few pages in my app (MVC5, EF6 Code First, newest Identity).
This is a glimpse snapshot from one of my normal pages right now:
An hour or so later, I was back and checking on things again. However, this time I noticed Glimpse was reporting this:
Nothing had changed on the server - no data or code. Notice the number of queries jumped from 20 to 43.
A quick look into those queries revealed that there are a bunch of Identity tables being queried multiple times (all duplicates of each other).
For example, instead of this query getting excited once, it now gets excited about 4 or 5 times:
Same with this:
The AspNetUsers and AspNetUserLogins also gets queried multiple times.
Browsing ANY page on the site has all of these extra queries, even a completely empty controller and view (with no authentication required). Once the extra queries are there, they don't seem to go away until a logout.
If I log out and log back in, I am back to the normal operation. I was able to repeat this on my production server and development computer - both seem to be triggered by a period of inactivity (session related?).
Thoughts?