Home > DeveloperSection > Interviews > How do you turn off SessionState in the web.config file?

Posted on    June-15-2013 4:06 AM

 ASP.Net ASP.Net 
 2 Answer(s)
  1979  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    June-15-2013 12:00 AM

Section of web.config, you should locate the httpmodule tag and you simply disable session by doing a remove tag with attribute name set to session.


<remove name=”Session” />


Durgesh Tripathi
Durgesh Tripathi

Total Post:3

Posted on    July-20-2013 12:00 AM



<sessionState mode="Off|InProc|StateServer|SQLServer"


              timeout="number of minutes"


              sqlConnectionString="sql connection string"

              stateNetworkTimeout="number of seconds"/>



Set the sessionState mode=”Off” in web.config file to off the session state.

Off Indicates that session state is not enabled.
InProc Indicates that session state is stored locally.
StateServer Indicates that session state is stored on a remote server.
SQLServer Indicates that session state is stored on the SQL Server.

Don't want to miss updates? Please click the below button!

Follow MindStick