1

On local it accessible but after deploy it not work:

System.Web.HttpContext.Current.Session["EflowSession"] return null

  • You will have to show more code (and context), as merely a call to a certain object can legally be `null`. And you are also using `HttpContext.Current` for no good reason (at least from the current question body). It is recommended to use `ControllerBase.HttpContext` https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.httpcontext?view=aspnetcore-7.0 – Lex Li Oct 05 '22 at 23:34

1 Answers1

0

If the problem is only on IIS, make sure that the Session State is not disabled for the application in IIS.

enter image description here

samwu
  • 3,857
  • 3
  • 11
  • 25