Different between session and state management in ASP.NET Core
Loading
Different between session and state management in ASP.NET Core
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Aug 1, 2022, 6:33 AM
See:
https://docs.microsoft.com/en-us/previous-versions/aspnet/75x4ha6s(v=vs.100)
https://www.c-sharpcorner.com/UploadFile/b926a6/state-management-concept-in-Asp-Net
https://www.c-sharpcorner.com/UploadFile/2072a9/state-management-in-Asp-Net
State Management is in both the client and the server whereas Session state is only server-side and one of multiple possible ways to maintain state. The Microsoft article says application state, session state, and profile properties all store data in memory on the server.
Session state is a subset of State Management.
Sachin SinghPosted Aug 1, 2022, 5:33 AM
It's not about ASP.NET Core or ASP.NET MVC or any other web framework available. It is all about how http works.
With HTTP each request is a new request that have no relation with the previous one.
Now, come to the point,
You can think of statement management as a subset of Session Management, State Management emphasis on maintaining the Form's value (input, textarea, dropdown etc) from client (HTML page) to Sever (Controller/Razor pages code behind in ASP.NET Core) or from one Action to Other.
While Session Management emphasise on keeping the User related value as long as he doen't logs out. Meaning from Login till logout so that you would know that it is the same user.
Amit MohantyPosted Aug 1, 2022, 5:28 AM