I have a small project that uses the Asp.Net Core Identity framework along with EF Core. One function calls UserManager.FindByIdAsync (id) and returns the corresponding object. However, it only works a few minutes after starting the application. While the server is busy, it works fine, but as soon as the application is idle for more than 1-2 minutes, the request fails.
Failure:
*OperationCanceledException: The operation was canceled.
System.Threading.CancellationToken.ThrowOperationCanceledException()*
The stacktrace element is as follows:
*System.Threading.CancellationToken.ThrowOperationCanceledException()
Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore.FindByIdAsync(string userId, CancellationToken cancellationToken)
Microsoft.AspNetCore.Identity.UserManager.FindByIdAsync(string userId)
MyProject.Areas.Admin.ControllerServices.UserService+<GetUser>d__11.MoveNext() in UserService.cs*
I am still logged in as other pages are working fine. A simple EF call context.Users.FindAsync(new object[] { id })will work as expected, but the next line containing FindByIdAsyncwill fail.
dev, , IIS WS 2008 R2. , .
, , "Connection id" 0HL5E91K33IIQ "reset." , . .
FindByIdAsync , , .
?