Monday, January 14, 2013

Session InProc Mode in ASP.NET


InProc is the default mode. InProc is similar to how session state was stored in previous versions of ASP. It instructs information to be stored in the same process as the ASP.NET worker threads, which provides the best performance but the least durability. If you restart your server, the state information will be lost.

InProc makes sense for most small websites. In a web farm scenario, though, it won’t work. To allow session state to be shared between servers, you must use the out-of-process or SQL Server state service. Another reason you might want to avoid InProc mode is if you find that your users are losing session state information at unpredictable times. In ASP.NET, application domains can be restarted for a variety of reasons, including configuration changes and updated pages, and when certain thresholds are met (regardless of whether an error has occurred). If you find that you’re losing sessions before the timeout limit, you may want to experiment with a more durable mode.

No comments:
Write comments
Recommended Posts × +