My session-object dies way to early

Discussion in 'ASP .Net' started by Mr m?ll, Oct 12, 2004.

  1. Mr m?ll

    Mr m?ll Guest

    Hi
    Im quite new to web programming and I'm buildning this ASP .net page.

    I use VS 2003 and C# + IIS 5. The page consists of a login page that
    leads to a frame page (with some pages, reading from a MSDE-database)

    In the projects web.config-file I have
    sessionState mode="InProc"
    cookieless="true"
    timeout="40"

    But all I get is a few lousy minutes before my Session-object dies.
    What am I doing wrong ?

    /Thanks in advance, Möll
     
    Mr m?ll, Oct 12, 2004
    #1
    1. Advertising

  2. take a look in
    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config at
    sessionState tag and look at attribute timeout to see how many minutes is set
    there.

    hope helps
    Cheers

    "Mr m?ll" wrote:

    > Hi
    > Im quite new to web programming and I'm buildning this ASP .net page.
    >
    > I use VS 2003 and C# + IIS 5. The page consists of a login page that
    > leads to a frame page (with some pages, reading from a MSDE-database)
    >
    > In the projects web.config-file I have
    > sessionState mode="InProc"
    > cookieless="true"
    > timeout="40"
    >
    > But all I get is a few lousy minutes before my Session-object dies.
    > What am I doing wrong ?
    >
    > /Thanks in advance, Möll
    >
     
    =?Utf-8?B?UHN5Y2hv?=, Oct 12, 2004
    #2
    1. Advertising

  3. if you are having problem with sql connection then you should change your
    connectiontimeout on command and set to this a longer timeout. I think it is
    set to 5 min.

    "Mr m?ll" wrote:

    > Hi
    > Im quite new to web programming and I'm buildning this ASP .net page.
    >
    > I use VS 2003 and C# + IIS 5. The page consists of a login page that
    > leads to a frame page (with some pages, reading from a MSDE-database)
    >
    > In the projects web.config-file I have
    > sessionState mode="InProc"
    > cookieless="true"
    > timeout="40"
    >
    > But all I get is a few lousy minutes before my Session-object dies.
    > What am I doing wrong ?
    >
    > /Thanks in advance, Möll
    >
     
    =?Utf-8?B?UHN5Y2hv?=, Oct 12, 2004
    #3
  4. if this still doesn't work i found that there is another option which can be
    set to make your session longer.
    In IIS on your web application right click properties
    on virtual directory tab click configuration button
    here on option tab set your session timeout.

    "Mr m?ll" wrote:

    > Hi
    > Im quite new to web programming and I'm buildning this ASP .net page.
    >
    > I use VS 2003 and C# + IIS 5. The page consists of a login page that
    > leads to a frame page (with some pages, reading from a MSDE-database)
    >
    > In the projects web.config-file I have
    > sessionState mode="InProc"
    > cookieless="true"
    > timeout="40"
    >
    > But all I get is a few lousy minutes before my Session-object dies.
    > What am I doing wrong ?
    >
    > /Thanks in advance, Möll
    >
     
    =?Utf-8?B?UHN5Y2hv?=, Oct 12, 2004
    #4
  5. Hi,

    I guess that you use forms authentication. Do you have a timeout defined for
    forms authentication on the web.config? The problem can be as follows; if the
    forms authentication cookie expires (assuming you have a nonpersistent
    cookie), the session will be lost although it did not expire yet.

    Btw, in my tests, I see that when you put a session timeout on the IIS level
    and when you also define it on web.config on session state, then the setting
    on web.config overwrites the IIS setting.

    "Mr m?ll" wrote:

    > Hi
    > Im quite new to web programming and I'm buildning this ASP .net page.
    >
    > I use VS 2003 and C# + IIS 5. The page consists of a login page that
    > leads to a frame page (with some pages, reading from a MSDE-database)
    >
    > In the projects web.config-file I have
    > sessionState mode="InProc"
    > cookieless="true"
    > timeout="40"
    >
    > But all I get is a few lousy minutes before my Session-object dies.
    > What am I doing wrong ?
    >
    > /Thanks in advance, Möll
    >
     
    =?Utf-8?B?RXRoZW0gQXp1bg==?=, Oct 12, 2004
    #5
  6. Hi,

    I guess that you use forms authentication. Do you have a timeout defined for
    forms authentication on the web.config? The problem can be as follows; if the
    forms authentication cookie expires (assuming you have a nonpersistent
    cookie), the session will be lost although it did not expire yet.

    Btw, in my tests, I see that when you put a session timeout on the IIS level
    and when you also define it on web.config on session state, then the setting
    on web.config overwrites the IIS setting.

    Hope this helps,

    Ethem

    "Mr m?ll" wrote:

    > Hi
    > Im quite new to web programming and I'm buildning this ASP .net page.
    >
    > I use VS 2003 and C# + IIS 5. The page consists of a login page that
    > leads to a frame page (with some pages, reading from a MSDE-database)
    >
    > In the projects web.config-file I have
    > sessionState mode="InProc"
    > cookieless="true"
    > timeout="40"
    >
    > But all I get is a few lousy minutes before my Session-object dies.
    > What am I doing wrong ?
    >
    > /Thanks in advance, Möll
    >
     
    =?Utf-8?B?RXRoZW0gQXp1bg==?=, Oct 12, 2004
    #6
  7. Mr m?ll

    Mr m?ll Guest

    Thanks guys!

    Sorry for not answering your posts earlier haven't been home...
    anyway. I tried some of the things you suggested and now I have my
    40 mins for the session-object (can't really say what did it though ... )

    Best regards, Möll
     
    Mr m?ll, Oct 19, 2004
    #7
    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. =?Utf-8?B?UmFq?=

    Session Dies very quickly

    =?Utf-8?B?UmFq?=, Apr 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    378
    Saravana [MVP]
    Apr 16, 2004
  2. Benjamin

    Cleanup when a object dies

    Benjamin, Jan 23, 2008, in forum: Python
    Replies:
    2
    Views:
    255
    Benjamin
    Jan 24, 2008
  3. Tony  Lay
    Replies:
    1
    Views:
    866
    Tony Lay
    Jul 13, 2009
  4. Dica

    session state dies

    Dica, May 2, 2005, in forum: ASP General
    Replies:
    4
    Views:
    159
  5. Christopher M. Lusardi
    Replies:
    3
    Views:
    203
    Alan J. Flavell
    Oct 19, 2003
Loading...

Share This Page