Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Sessionstate cookieless="true" in asp .Net, is the sessions state maintained?

Tags:

asp.net

How can the session state be maintained in asp.Net, if the cookies are turned off in browser or cookieless="true" is added within sessionmode tags in web.config?

The following tag shows cookieless="true" in web.config.

<sessionState mode="InProc"
  cookieless="true"
  timeout="30"/>
like image 815
MGeorge Avatar asked Mar 24 '15 12:03

MGeorge


1 Answers

ASP.NET framework inserts a unique id to the URL, you can check this by disabling the cookie or by setting the cookieless attribute to true as you did.

According to MSDN:-

By default, the SessionID value is stored in a non-expiring session cookie in the browser.

If you specify cookieless="true" then:

ASP.NET maintains cookieless session state by automatically inserting a unique session ID into the page's URL.

like image 198
Rahul Singh Avatar answered Sep 28 '22 20:09

Rahul Singh