SessionState timeout problem

Discussion in 'ASP .Net' started by Mikko Penkkimäki, Sep 6, 2004.

  1. Hi

    Looks like I can not change Web page's timeout setting. In practise it's all
    the time 20 minutes - no matter what I do.

    I have this kind of setting in web.config:
    <sessionState
    mode="InProc"
    cookieless="true"
    timeout="1"
    />

    With this settings program goes to Global.asax's Session_End() function
    after 1 minute but the session is still running after this. It's only after
    20 minutes when the session really stops.

    I have tried to change the timeout setting in Machine.config also >> No
    difference.
    I have even booted my computer after I have made change to the setting -
    just in case if something is still running in memory. >> No help.

    That 20 minutes settings has to be somewhere hidden, but where? Couldn't
    find it from IIS either.

    I have Windows XP Pro and Visual Studio .NET 2003.

    Please help me.

    Regards
    Mikko
    Mikko Penkkimäki, Sep 6, 2004
    #1
    1. Advertising

  2. How are you determining that the session is still running? Is it just that
    you dont go back to the login page or something like that?

    --
    - Paul Glavich
    Microsoft MVP - ASP.NET


    "Mikko Penkkimäki" <> wrote in message
    news:413c4dd6$0$10402$...
    > Hi
    >
    > Looks like I can not change Web page's timeout setting. In practise it's

    all
    > the time 20 minutes - no matter what I do.
    >
    > I have this kind of setting in web.config:
    > <sessionState
    > mode="InProc"
    > cookieless="true"
    > timeout="1"
    > />
    >
    > With this settings program goes to Global.asax's Session_End() function
    > after 1 minute but the session is still running after this. It's only

    after
    > 20 minutes when the session really stops.
    >
    > I have tried to change the timeout setting in Machine.config also >> No
    > difference.
    > I have even booted my computer after I have made change to the setting -
    > just in case if something is still running in memory. >> No help.
    >
    > That 20 minutes settings has to be somewhere hidden, but where? Couldn't
    > find it from IIS either.
    >
    > I have Windows XP Pro and Visual Studio .NET 2003.
    >
    > Please help me.
    >
    > Regards
    > Mikko
    >
    >
    Paul Glavich [MVP - ASP.NET], Sep 6, 2004
    #2
    1. Advertising

  3. Mikko Penkkimäki

    Karl Guest

    Also, keep in mind that it's 20 minutes from the last activity - ie, it's a
    sliding timer not an absolute one.

    karl


    "Mikko Penkkimäki" <> wrote in message
    news:413c4dd6$0$10402$...
    > Hi
    >
    > Looks like I can not change Web page's timeout setting. In practise it's

    all
    > the time 20 minutes - no matter what I do.
    >
    > I have this kind of setting in web.config:
    > <sessionState
    > mode="InProc"
    > cookieless="true"
    > timeout="1"
    > />
    >
    > With this settings program goes to Global.asax's Session_End() function
    > after 1 minute but the session is still running after this. It's only

    after
    > 20 minutes when the session really stops.
    >
    > I have tried to change the timeout setting in Machine.config also >> No
    > difference.
    > I have even booted my computer after I have made change to the setting -
    > just in case if something is still running in memory. >> No help.
    >
    > That 20 minutes settings has to be somewhere hidden, but where? Couldn't
    > find it from IIS either.
    >
    > I have Windows XP Pro and Visual Studio .NET 2003.
    >
    > Please help me.
    >
    > Regards
    > Mikko
    >
    >
    Karl, Sep 6, 2004
    #3
  4. Hi

    There's no login page in the software. New session is created for every new
    user from "HttpContext.Current.Session.SessionID". This SessionID is used
    for loading and saving user dependent session data (for
    ex."HttpContext.Current.Session["UserDependentVariable_1"]").

    I can see that the session is still running because the SessionID is still
    the same and all user dependent data is still in session. When I change to
    another page in the software after about 20 minutes, the SessionID has been
    changed. Session data is also empty - of course.

    I have now changed the SessionState's mode to "StateServer". I have read
    from the Web that it's not as buggy as "InProc". Still no effect in my
    software.

    My problem is that there is a need that the session lasts hours - not 20
    minutes. I have changed SessionState's timeout to "120" in Web.config and
    Machine.config. I also found setting from IIS: Web page Properties >>
    Configuration... >> Options: Enable session state, Session timeout. I
    changed also this to 120. Still the session is lost after about 20 minutes.

    I have tried to find answer to this from the Web. I haven't found any answer
    yet but I have found many other programmers who have faced the same problem:
    Sessions just don't last long. Is there any way to get over this?

    Regards
    Mikko


    "Paul Glavich [MVP - ASP.NET]" <-NOSPAM> wrote in
    message news:%...
    > How are you determining that the session is still running? Is it just that
    > you dont go back to the login page or something like that?
    >
    > --
    > - Paul Glavich
    > Microsoft MVP - ASP.NET
    >
    >
    > "Mikko Penkkimäki" <> wrote in message
    > news:413c4dd6$0$10402$...
    >> Hi
    >>
    >> Looks like I can not change Web page's timeout setting. In practise it's

    > all
    >> the time 20 minutes - no matter what I do.
    >>
    >> I have this kind of setting in web.config:
    >> <sessionState
    >> mode="InProc"
    >> cookieless="true"
    >> timeout="1"
    >> />
    >>
    >> With this settings program goes to Global.asax's Session_End() function
    >> after 1 minute but the session is still running after this. It's only

    > after
    >> 20 minutes when the session really stops.
    >>
    >> I have tried to change the timeout setting in Machine.config also >> No
    >> difference.
    >> I have even booted my computer after I have made change to the setting -
    >> just in case if something is still running in memory. >> No help.
    >>
    >> That 20 minutes settings has to be somewhere hidden, but where? Couldn't
    >> find it from IIS either.
    >>
    >> I have Windows XP Pro and Visual Studio .NET 2003.
    >>
    >> Please help me.
    >>
    >> Regards
    >> Mikko
    >>
    >>

    >
    >
    Mikko Penkkimäki, Sep 7, 2004
    #4
  5. Mikko Penkkimäki

    Jason Bailey Guest

    You were in the right place when you poked around in IIS.

    Go to the website in question, right-click and choose "Properties".
    Click on the "Home Directory" tab
    Click on the "Configuration" button
    Click on the "App Options" tab on the pop-up window
    Choose the session timeout you wish. As you can see on this screen, the
    default value built into IIS 5.0 out of the box is 20 minutes.


    Mikko Penkkimäki wrote:
    > Hi
    >
    > Looks like I can not change Web page's timeout setting. In practise it's all
    > the time 20 minutes - no matter what I do.
    >
    > I have this kind of setting in web.config:
    > <sessionState
    > mode="InProc"
    > cookieless="true"
    > timeout="1"
    > />
    >
    > With this settings program goes to Global.asax's Session_End() function
    > after 1 minute but the session is still running after this. It's only after
    > 20 minutes when the session really stops.
    >
    > I have tried to change the timeout setting in Machine.config also >> No
    > difference.
    > I have even booted my computer after I have made change to the setting -
    > just in case if something is still running in memory. >> No help.
    >
    > That 20 minutes settings has to be somewhere hidden, but where? Couldn't
    > find it from IIS either.
    >
    > I have Windows XP Pro and Visual Studio .NET 2003.
    >
    > Please help me.
    >
    > Regards
    > Mikko
    >
    >
    Jason Bailey, Sep 10, 2004
    #5
  6. Hi Jason,
    So which one works for Session.Timeout?
    The IIS setting or the web config?
    Bcos 'm confused!
    And which one overrides the other does IIS setting overrides the WEB
    CONFIG?
    Let me know please.
    thanks





    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    naijacoder naijacoder, Sep 10, 2004
    #6
  7. Mikko Penkkimäki

    iatethepies

    Joined:
    Jul 26, 2007
    Messages:
    1
    Sorry to open up a thread that's a few years old but I'm having the same problem described above with no luck resolving it.
    I've changed

    sessionstate to 120mins
    added machinekey to the web.cofig
    iis app pool timeouts to 120mins
    sessionstate properties from iismanager-app config

    I've done everything I can think of but sessions are still being terminated after about 20 minutes. This doesn't seem to be on a sliding scale either as I can be working on the page for a few minutes and when I go to another page I get kicked back to the 'Default.aspx' screen.

    Any suggestions are appreciated
    iatethepies, Jul 26, 2007
    #7
  8. Mikko Penkkimäki

    ruffone

    Joined:
    Jun 21, 2009
    Messages:
    1
    Q: Why does the SessionID remain the same after the Session times out or abandoned?
    A:Even though the session state expires after the indicated timeout period, the session ID lasts as long as the browser session. What this implies is that the same session ID can represent multiple sessions over time where the instance of the browser remain the same.

    eggheadcafe. com/articles/ 20021016.asp
    ruffone, Jun 21, 2009
    #8
  9. Mikko Penkkimäki

    new1

    Joined:
    Jun 7, 2013
    Messages:
    1
    Great you even booted your computer after you have made change to the setting, great man , but you missed one single thing, you must have reinstalled the windows and that would have surely worked.
    new1, Jun 7, 2013
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carpe Diem
    Replies:
    3
    Views:
    7,134
    Carpe Diem
    Feb 23, 2004
  2. --alec
    Replies:
    0
    Views:
    8,389
    --alec
    Jun 24, 2004
  3. Randall Parker
    Replies:
    1
    Views:
    6,673
    Chris Crowe [MVP 1997 -> 2006]
    Dec 6, 2005
  4. Sosh
    Replies:
    1
    Views:
    1,852
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 31, 2005
  5. Replies:
    0
    Views:
    522
Loading...

Share This Page