why Session expires before timeout ???

Last post 11-20-2008 7:14 AM by aspnet.user. 3 replies.

Sort Posts:

  • why Session expires before timeout ???

    11-19-2008, 1:51 PM

    Hii All,

     I am facing Session expire problem frequently.. I did all possible settings like setting Session timeout in web.config or IIS but didnt worked.

    I checked all project code, my session variables  only created at login page and abandon at signout page.In remaining page I just get those session values.

    please help,!!!!

    Fanindra

  • Re: why Session expires before timeout ???

    11-20-2008, 2:28 AM
    • Member
      34 point Member
    • azhagu_02
    • Member since 10-10-2008, 1:46 PM
    • Posts 24

     Hi,

    Don't use session.abondon() method in that page. It will expires all the session's variable in the entire website.

    So clear the session variable for the particular session.

     

    Thanks,

     

    Time and Tide never waits for none.
    Filed under:
  • Re: why Session expires before timeout ???

    11-20-2008, 2:28 AM
    • Participant
      768 point Participant
    • zsuzen
    • Member since 09-25-2007, 3:28 PM
    • UK
    • Posts 150
    Ar you using InProc session mode? Try using the state server. In your web.config: 
        <sessionState mode="StateServer"/>
    

     ..and don't forget to stat 'Asp.Net state server' service from control panel, Administrative Tools, Services.

    --Ziya

  • Re: why Session expires before timeout ???

    11-20-2008, 7:14 AM
    Answer
    • Member
      33 point Member
    • aspnet.user
    • Member since 09-09-2008, 4:22 AM
    • Posts 35

    Session will expire in 3 scenarios:

    1. If the cookie, created at the client, is deleted

    2. If you are maintaining cookieless sessions then a) your application is being restarted, OR b) IIS is being restarted.

    Solution:

    Point 1: See if any process at the client is interfering with the cookie. See to it that it's not getting deleted or modified.

    Point 2: If you are using ASP.NET 2.0 then maintain your session data in ASPNET state server or SQL Server. Let me know if you need additional information.

     

Page 1 of 1 (4 items)