0

As per the docs, I have added recommended code in Startup.cs

In the OnGet handlers of razor pages, I noticed that HttpContext.Session.Id keeps changing between the page requests. As a result, I am not able to maintain state on the server.

Has anyone encountered this issue? I am using ASP.NET core 2.1.1

Resolution found in this post "ASP.NET core 2.1 session"

my2cents
  • 1
  • 2
  • I need to retain some information on the server (in memory) while a user navigates the web site filling out information on various forms (Razor pages). I followed the instructions provided in this article "https://learn.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-2.2". Should work. But in my case, it does not. A new session (id) gets generated for each request. – my2cents Jan 10 '19 at 18:16
  • Thank you for your time. The resolution for this issue has been given in this post "https://stackoverflow.com/questions/49317304/asp-net-core-2-1-session" – my2cents Jan 10 '19 at 19:00
  • Possible duplicate of [ASP.NET core 2.1 session](https://stackoverflow.com/questions/49317304/asp-net-core-2-1-session) – mjwills Jan 10 '19 at 21:49

0 Answers0