ASP.NET Session State

ASP.NET Session State
Posted by Arvand Sabetian on 04 June 2010 03:05 AM

This article at Microsoft provides detailed analysis of different modes that can be used to store states:

In short, you can use “in-proc” for the simplest method which will store the sessions inside the memory of your application. However, app pools on our shared services (we offer a dedicated app pool for each website) are limited to a certain amount of memory.

To get around that limitation, we suggest using the “out-of-process” mode. To do this, the string will be changed to something like this in the web.config:



  <sessionState mode=”StateServer” cookieless=”false” timeout=”20″ /> 



If switching to StateServer is giving you an error, the asp net service may need to be turned on at the server level. Please contact support. For further explanation on what the above tags mean, please refer to the Microsoft post at the start of this post.

This may be necessary for this to work properly:

The machineKey tag would be placed inside your web.config .

Un categorized Comments



The right syntax is:
<sessionState mode=”StateServer” cookieless=”false” timeout=”20″ />
Justin McNulty
not working at all, shows error : 500 – Internal server error. Contact three help staffs , takes very long time and still cannot figure it out




500 errors generally mean a syntax error inside the web.config. Please make sure there are no typos and the tag is properly placed in the right location.


This is not working in my plan.i try any thing code for session state in web.config file. 🙁


What error are you getting? Ask staff for support. At times, the service needs to be started for the first time if you are the first person using the session state service on that service.


Can anyone elaborate on why you have to include a machine key tag? What does it do? Why does the state server fail without it?Admin


The machine key authenticates the connection from your website to the database. It is how the SQL server knows that your connection has the authority to view, edit or delete data in your SQL database.


ASP .NET / ASP, Blog



Share This Post:

Submit a Comment

Ratnam Technologies © 2018.  All rights reserved. |   Privacy Policy | Terms & Conditions