How to enable session state

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

In an ASP.Net using framework v2 what is required to enable session
state to be setup for the web code and the database?
 
re:
!> Asp.net have session enabled by default...

Yes, session is enabled by default in "In Process" mode ( "Inproc" ).

Here's the default configuration :

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
sqlCommandTimeout="30"
customProvider=""
cookieless="UseCookies"
cookieName="ASP.NET_SessionId"
timeout="20"
allowCustomSqlDatabase="false"
regenerateExpiredSessionId="true"
partitionResolverType=""
useHostingIdentity="true">
<providers>
<clear />
</providers>
</sessionState>

If you don't want to use sessions, configure mode="Off"

<sessionState mode="Off">

Btw, the link you provided is for the Beta of the .Net Framework.
The reference in the article to "config.web" is a dead giveaway... :-)

Here's a more recent reference :
http://msdn.microsoft.com/en-us/library/h6bb9cz9(VS.80).aspx



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top