In IdSrv what is sessionstate used for? RRS feed

  • Question

  • User1358036820 posted

    I have a test server and get the response as below after logging in.



    What is the SessionState property used for?  Is it anything at all to do with Asp.net Session?

    Thursday, January 23, 2020 12:33 AM

All replies

  • User281315223 posted

    If you have ASP.NET Session state enable, there's nothing that Identity Server on it's own (that I'm aware of) that is going to specifically do to remove it. So the session state you see is likely just from your application itself.

    Thursday, January 23, 2020 4:19 AM
  • User665608656 posted

    Hi ammd,

    Session state, in the context of .NET, is a method keep track of the a user session during a series of HTTP requests. Session state allows a developer to store data about a user as he/she navigates through ASP.NET web pages in a .NET web application.

    The concept of a session is generic and applies to most web servers. Session state however is a Microsoft-centric concept.

    When a user visits a site, it’s sessions starts and when the user become idle or leave the site, the session ends. 

    More details, you could refer to this link :

    Session State in ASP.Net

    What is the difference between session variable and session state?

    Best Regards,


    Thursday, January 23, 2020 5:36 AM
  • User1358036820 posted

    Thanks for the replies I am fully aware of what session state is in general but as I mentioned it was coming back in the sample applications along with token and other details as per my sample above.  I was wondering what it meant in that context as there is no session enabled in the IdSrv project by default.  As its a part of the response from the following code I was just thinking where it might have come from.

    @using Microsoft.AspNetCore.Authentication


    @foreach (var claim in User.Claims)


    @foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items)

    Thursday, January 23, 2020 12:17 PM