Cookie on timeout on Idle asp.net 3.0 for web app RRS feed

  • Question

  • User1811554030 posted

    Hi Guys,

    I want to find out if there is a way to timeout the cookie if the state of the app is idle, like similar to a session as code example below :

    services.AddSession(options =>
                    options.IdleTimeout = TimeSpan.FromMinutes(1);
                    //options.Cookie.IsEssential = true;
                    //options.Cookie.HttpOnly = true;

    I have the following code as below, but as I understand this only expires the cookie regardless of idle or not

                        .AddCookie(options =>
                            options.ExpireTimeSpan = TimeSpan.FromMinutes(1);
                            options.LoginPath = "/Account/Login";                         
                            options.Cookie.IsEssential = true;
                            options.Cookie.Expiration = TimeSpan.FromMinutes(1);
                            //options.Cookie.HttpOnly = true;

    Is there a cookie : options.IdleTimeout 

    Please assist. 

    Thank you in advance.



    Wednesday, November 13, 2019 1:25 PM

All replies