Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 ASP.NET
 How to prevent Session Timeout
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sql_lover
Starting Member

14 Posts

Posted - 04/18/2007 :  03:12:42  Show Profile  Reply with Quote
i hv set session timeout to 20 minutes

<add key="connectionstring" value="user id=sa;pwd=admin;data source=SERVER;packet size=4096;persist security info=false;initial catalog=Institute Mgt;Connect Timeout=20"></add>

but i session expires too often
what should i do keep my session alive for
longer time

pls help me as soon as possible

snSQL
Flowing Fount of Yak Knowledge

USA
1837 Posts

Posted - 04/18/2007 :  11:05:26  Show Profile  Reply with Quote
Have you considered setting it to a a number higher than 20?
Go to Top of Page

jhermiz
Flowing Fount of Yak Knowledge

USA
3564 Posts

Posted - 04/18/2007 :  13:07:41  Show Profile  Visit jhermiz's Homepage  Reply with Quote
How are you using session variable?
Are you setting the session in a specific part that is causing the problem.
Can you post examples.


Programmers HowTo's -- http://jhermiz.googlepages.com
Go to Top of Page

sshelper
Posting Yak Master

216 Posts

Posted - 04/18/2007 :  13:17:06  Show Profile  Visit sshelper's Homepage  Reply with Quote
If you are referring to the session timeout from a ASP.NET page, the timeout value is defined in the sessionState part of the web.config.

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page

sql_lover
Starting Member

14 Posts

Posted - 04/20/2007 :  03:43:05  Show Profile  Reply with Quote
quote:
Originally posted by sshelper

If you are referring to the session timeout from a ASP.NET page, the timeout value is defined in the sessionState part of the web.config.

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

SQL Server Helper
http://www.sql-server-helper.com



i hv already declred value of 20 in seesion state
but still session expires too frequently
Go to Top of Page

sql_lover
Starting Member

14 Posts

Posted - 04/20/2007 :  03:45:13  Show Profile  Reply with Quote
quote:
Originally posted by jhermiz

How are you using session variable?
Are you setting the session in a specific part that is causing the problem.
Can you post examples.


Programmers HowTo's -- http://jhermiz.googlepages.com



once the user logs in i m seeting a user name(which is a seesion var)
in welcome msg
which is used as a web user control in every page
now this user name(sesion var)expires almost every 5-6 minutes

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000