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
9. Why should we hire you over the others waiting to be interviewed?
How to include silver light .xap page into asp.net web application and what is the purpose of using silverlight application?
What is the difference between a page theme and a global theme?
What is web api config?
Is asp.net web forms dead?
What are HTTP handlers in ASP.NET?
What is the significance of finalize method in .net?
Explain global assembly cache.
What symbol would you use to denote, the start of a code block in aspx views?
Is it possible to apply themes to an asp.net application? If yes, then how?
What is application session?
Should I delete cookies?
What are the types of caching in asp.net?
What is the application pool?
Why asp.net is better than php?