I have an ASP.NET Core 1.1.2 project in which I use cookie authentication. I have a problem where users are prompted to return to the system after a downtime for an hour or less and lose their jobs. The code below is what I use in the Configure function in Startup.cs to set this and from what I can say, it should expire after 8 hours. BTW, ProjectProcessFlow is just the name of the project.
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationScheme = "ProjectProcessFlow",
LoginPath = new PathString("/Account/Login/"),
ExpireTimeSpan = new TimeSpan(8, 0, 0),
SlidingExpiration = true,
AutomaticAuthenticate = true,
AutomaticChallenge = true
});
I turn on Microsoft.AspNetCore.Authentication.Cookies v1.1.2 in NuGet. What do I need to do to expire login at the expected time?
Additional Information:
I found that when a timeout occurred and the user was prompted to log in again, a warning was found in the event viewer on the server that he could not find the log folder within the project. So I created this folder and waited for the timeout to happen again. When this happened, a log file was created in this folder containing the following:
Hosting environment: Production
Content root path: C:\inetpub\wwwroot\Sprout
Now listening on: http://localhost:13423
Application started. Press Ctrl+C to shut down.
When I repeated this process, the same thing happened, except that after "localhost:" a different number appeared. I should mention that the project name is ProjectProcessFlow, but the URL ends with Sprout.
source
share