ASP.NET session variables lost in shared hosting environment

115 views Asked by At

I'm using ASP.NET 4.8. My webapp uses standard session state variables. On my local machine, everything is fine. On GoDaddy the site is in a shared hosting environment.

When hosted, the Application_End event is being triggered on most requests; I can see that in my logs. All the error says is "shutdown initiated by hosting environment".

I've tried many things but nothing seems to work.

1

There are 1 answers

2
Mark Spencer On

Most shared hosting provider doesn't permit you to use session on your code as it will impact to server performance. As an alternative, you can use Cookie or Asp.net session state.