I have this setting in the web.config file: <sessionState timeout="540" />
. This tries to make all the sessions expires after 8 hours. However, the session expires much faster than that and I got an object reference not set to an instance of an object error. Could some tell me if there is something else affects the session?
Thanks in advance!
SessionState expires also if the application pool recycles (inactivity, exception, or configuration).
Anyway, it is not a best practice to extend the SessionState timeout so much.
maybe you should change you dependency to session or use a different way to persist those objects (viewstate).
If you absolutely need to have session to persist so much you should use another server or a db as session store.
http://msdn.microsoft.com/en-us/library/ms178586(v=vs.100).aspx
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