By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,910 Members | 1,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,910 IT Pros & Developers. It's quick & easy.

How does the session timeout work?

P: n/a
There's a setting in the IIS where I have set Enabled Session Timeout to 20
minutes

Then there's a setting in the WebConfig file..
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>

Where I have set the timeout property to 20..

But seriously when you run the application.. it feels like the timeout is
about 5 minutes or actually even a limit of 20 minutes for beeing logged in
period. Sometimes I can be working and I get thrown out anywway even if I
haven't left the application longer than a few seconds.

How do I make the correct settings for a Timeout of 20 minutes?

Best Regards/

Lars Netzel


Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you are using SQL Server to hold session data this settings will be
important. Otherwise, it would be ignored.
There are two types of session settings.
First, Session object's timeout property. You should set this property when
a session is started.
Second, application configuration. Right Click my computer choose manage.
From Services and Applications, choose Internet Information Services -
Default Web Site and your application. Right Click your application. Choose
properties. On Directory Tab, click Configuration button. From the options
tab set session time out.

I'm not sure, which will override given settings. But this two settings will
help u to overcome this issue.

--
Thanks,
Yunus Emre ALP÷ZEN

"Lars Netzel" <la*********@NO-SPAM.qlogic.se> wrote in message
news:OC**************@tk2msftngp13.phx.gbl...
There's a setting in the IIS where I have set Enabled Session Timeout to
20 minutes

Then there's a setting in the WebConfig file..
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>

Where I have set the timeout property to 20..

But seriously when you run the application.. it feels like the timeout is
about 5 minutes or actually even a limit of 20 minutes for beeing logged
in period. Sometimes I can be working and I get thrown out anywway even if
I haven't left the application longer than a few seconds.

How do I make the correct settings for a Timeout of 20 minutes?

Best Regards/

Lars Netzel



Nov 19 '05 #2

P: n/a
Hi, Lars.

If you use "In Process" state management ( InProc ),
whenever the ASP.NET worker process is recycled
your session variables will get lost.

The new process has no way to know
what the previous process variables were.

To preserve session contents when the recycling of an ASP.NET
worker process occurs, you must use either "State Server" or
"SQL Server" state management.

They both work "out of process", i.e., in a different worker process
than the one ASP.NET uses, so when the ASP.NET worker process
is recycled, the state management worker process continues to work
and your session data isn't lost.

best regards,

Juan T. Llibre
ASP.NET MVP
===========
"Lars Netzel" <la*********@NO-SPAM.qlogic.se> wrote in message
news:OC**************@tk2msftngp13.phx.gbl...
There's a setting in the IIS where I have set Enabled Session Timeout to
20 minutes

Then there's a setting in the WebConfig file..
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20"/>

Where I have set the timeout property to 20..

But seriously when you run the application.. it feels like the timeout is
about 5 minutes or actually even a limit of 20 minutes for beeing logged
in period. Sometimes I can be working and I get thrown out anywway even if
I haven't left the application longer than a few seconds.

How do I make the correct settings for a Timeout of 20 minutes?

Best Regards/

Lars Netzel



Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.