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
What are the advantages of passport authentication?
What are the file extensions for razor views?
Why mvc is better than asp.net? : Asp.Net MVC
What is custom attribute?
How can we inherit a static variable?
How to comment out asp.net tags?
What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
How we can force all the validation controls to run?
Explain the main differences between asp and asp.net?
Explain file-based dependency and key-based dependency.
What is Difference between Production Serves and Development Servers? And Suppose, m adding/deleting C# file in a project based on the Specific Requirement. These Files are Automatically updated in Production Servers? So Which tool is needed to do This One?
Describe state management in asp.net?
How does ASP.NET framework maps client side events to Server side events.?
Which class is used to send an email message from an ASP.NET Web page?
Explain what the contents of cookie?