I was considering using <sessionState mode="InProc" timeout="45" />
because some users are repeatedly logging in, and I would like to save them some time. However, before I add this to my web.config
file, I wanted to make sure there would be no side affects.
I read up on sessionState
versions, although I already am fairly aware of what goes on, I was curious to know what the default setting for an asp.net mvc 3
application was as there is no defined sessionState
inside of my system.web
at this time.
I know that the application has access to Session["key"]
without the declaration, although I try to avoid putting that type of load on the Session. I would assume that there is a setting in IIS 7 which my application is inheriting (This application is on a shared hosting environment).
I understand that there could be issues if I was using a dedicated database or server for the Session, but this is just a basic setup as far as that goes, nothing fancy.
Is there a default sessionState
for asp.net mvc 3? Is it just being inherited? Will there be side affects from overriding it in my web.config
if it is defined elsewhere in IIS?
config or Web. config configuration file identified by the sessionState tag. When a new client begins interacting with a Web application, a session ID is issued and associated with all the subsequent requests from the same client during the time that the session is valid.
By default, Asp.Net MVC support session state.
Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm. Objects stored in session state must be serializable if the mode is SQL Server.
As of now the default Timeout
= 20 minutes.
These are the default values for .Net Framework 4. I think they don't change because of MVC 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With