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
Write a code for sending an email from asp.net application.
How to Insert/Add in ASPXgridview
How can you implement encapsulation in asp.net?
What is aspect-oriented programming?
Explain the features that make asp.net more used framework? : asp.net mvc
What is the question mark in a url?
List of words of preprocessor in .net?
What are the media types of http requests and response?
Whats the difference between abstract factory pattern and factory pattern?
What is directive in asp net?
Is asp.net a programming language?
Explain the difference between codebehind="mycode.aspx.cs" and src="mycode.aspx.cs"?
Which is better union or union all?
What is difference between view and partial view?
Which namespace is used by ado.net?