3

I have a web service that is tracking a user across operation calls. I'm storing my users' information in the HttpContext.Current.Application variable, which is a HttpApplicationState. I've noticed that sometimes, my key is there, sometimes it is not. Because of this, I assume that the duration of my application state is expiring.

Is there a way to configure this? If so, how?

THank you!

Villager
  • 6,569
  • 22
  • 65
  • 87

2 Answers2

1

After x minutes of idle time, IIS will terminate the worker processes. I assume that HttpApplicationState will then be lost.

You can disable idle timeout, see How to prevent/extend idleTimeout in IIS 7?

Community
  • 1
  • 1
Richard Schneider
  • 34,944
  • 9
  • 57
  • 73
1

The application will be unloaded through the iss after a idle time. You can set this idletime to 0 in the properties of the application pool. With the setting 0 the iis will never unload your app.

sra
  • 23,820
  • 7
  • 55
  • 89