SessionState - type of sessionstate and when and how to use
it

Answer Posted / alb.shah

SessionState tag is used to define session attributes.
One very important is Mode which can have values: "state
server", "SqlServer", "InProc"; depending how you want to
preserve session state.
"State server" is used if you want the state to be
preserved in other server.
"SqlServer" is used if you want the state to be preserved
on a SQL database.
"InProc" is used if you want the state to be preserved in
the same process where the asp.net page is running.

Other attributes that are also included for the
SessionState tag are: ConnectionString,
SqLConnectionString, userId, password, cookiless, tiemout.

if the session state is going to be preserved in other
server, or can be ""SqlServer" if session state is going to
be preserved in a SQL database

Configuring session state: Session state features can be
configured via the <sessionState> section in a web.config
file. To double the default timeout of 20 minutes, you can
add the following to the web.config file of an application:
<sessionState
timeout="40"
/>

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using session?

440


How would you turn off cookies on a page of a website?

508


Take a Large textbox allow to type any data. Task 1:display the count of vowels in a lable on key press event of the textbox Task 2:dispaly count of dates in a lable when dates in following foramats:dd/mm/yy , mm/dd/yy , yy/mm/dd. Task3:compare 2 dates and display both are same or not which dates are in dd/mm/yy and mm/dd/yy farmats.

2597


What is an assembly? Explain its parts.

636


Which tool you have done?

1484






What is session authentication?

536


What is the use of the tag in the web.config file?

573


How many languages are supported by .NET at present time?

292


Explain the various authentication mechanisms in asp.net.

493


Explain parts of assembly?

557


Is it right that ASP.NET Web API has replaced WCF?

512


What is class and object in asp.net?

494


How do you identify that the page is postback?

543


What is the latest version of asp.net?

539


Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?

1911