http://msdn.microsoft.com/en-us/library/ms972429.aspx
The settings below are used to configure ASP.NET session state. .
* 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
(If we set -1, current time plus -1 is a past time that will never reached. So the session will never expires.)(These are only my thoughts. Pls correct me if I'm wrong)
* 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.
http://msdn.microsoft.com/en-us/library/ms178194.aspx
Deleting Cookies
Deleting a cookie-physically removing it from the user's hard disk-is a variation on modifying it. You cannot directly remove a cookie because the cookie is on the user's computer. However, you can have the browser delete the cookie for you.
The technique is to create a new cookie with the same name as the cookie to be deleted, but to set the cookie's expiration to a date earlier than today. When the browser checks the cookie's expiration, the browser will discard the now-outdated cookie. The following code example shows one way to delete all the cookies available to the application:
HttpCookie aCookie;
string cookieName;
int limit = Request.Cookies.Count;
for (int i=0; i<limit; i++)
{
cookieName = Request.Cookies[i].Name;
aCookie = new HttpCookie(cookieName);
aCookie.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(aCookie);
}
Please correct me if I'm wrong Nitha Deepak
Akiii, if this helps please login to Mark As Answer. | Alert Moderator