How to enable session state

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?
 
J

Juan T. Llibre

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top