Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ashley Zinyk 5 posts 86 karma points
    Jun 20, 2023 @ 19:01
    Ashley Zinyk
    0

    How to configure session state timeout

    I want to make the Context.Session timeout longer than the default of 20 minutes.

    The .NET 7 docs recommend putting configuration paramters into AddSession() in Startup.cs. However, Umbraco obscures AddSession by initializing it for us.

    Note that I'm talking about the session timeout for website visitors, not the CMS back office. I'm using Umbraco 11.2.0.

  • Ashley Zinyk 5 posts 86 karma points
    Jun 20, 2023 @ 19:59
    Ashley Zinyk
    1

    I was able to configure it by putting this in ConfigureServices, after services.AddUmbraco().

            services.AddSession(options =>
            {
                options.IdleTimeout = TimeSpan.FromMinutes(90);
            });
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies