Skip to content
This repository has been archived by the owner. It is now read-only.

Session options IdleTimeout is not working #169

Closed
hstarorg opened this issue May 27, 2017 · 5 comments

Comments

@hstarorg
Copy link

commented May 27, 2017

I used the code:

services.AddSession(options =>
{
    options.CookieHttpOnly = true;
    options.IdleTimeout = TimeSpan.FromDays(7);
});

But session cookie Expires always session, not the time after 7 days.

@lon-yang

This comment has been minimized.

Copy link

commented May 27, 2017

@Tratcher Tratcher added the duplicate label May 30, 2017

@Tratcher Tratcher closed this May 30, 2017

@hstarorg

This comment has been minimized.

Copy link
Author

commented May 31, 2017

Would you tell us, how to set the session cookie timeout? Very thanks. We are using .Net core 2.0 preview.

@Tratcher

This comment has been minimized.

Copy link
Member

commented May 31, 2017

The session cookie by definition has no timeout, it lasts for the lifetime of the browser session. The IdleTimeout lets you control how long data persists on your server which is the only aspect it is ever possible for you to maintain control over.

@hstarorg

This comment has been minimized.

Copy link
Author

commented May 31, 2017

Very thanks~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.