top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Can you describe all the property set in web.config under session state?

+5 votes
281 views
Can you describe all the property set in web.config under session state?
posted Dec 11, 2014 by Manikandan J

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
  <configuration>
     <sessionstate 
      mode="inproc"
     cookieless="false" 
     timeout="20" 
     sqlconnectionstring="data source=127.0.0.1;user id=<user id>;password=<password>"
     server="127.0.0.1" 
     port="42424" 
     />
  </configuration>

Explanation:

Mode:

The mode setting supports three options: inproc, sqlserver, and stateserver.

As stated earlier, ASP.NET supports two modes:

in process and out of process. There are also two options for out-of-process state management: memory based (stateserver), and SQL Server based (sqlserver). We'll discuss implementing these options shortly.

Cookieless:

The cookieless option for ASP.NET is configured with this simple Boolean setting.
Timeout: This option controls the length of time a session is considered valid. The session timeout is a

sliding value;

on each request the timeout period is set to the current time plus the timeout value

Sqlconnectionstring:

The sqlconnectionstring identifies the database connection string that names the database used for mode sqlserver.

Server:

In the out-of-process mode stateserver, it names the server that is running the required Windows NT service: ASPState.

Port:

The port setting, which accompanies the server setting, identifies the port number that corresponds to the server setting for mode stateserver.

answer Dec 14, 2014 by Shivaranjini
...