Session restart problem

Discussion in 'ASP .Net' started by Malin, Jan 19, 2006.

  1. Malin

    Malin Guest

    Hi everybody

    I have an asp.net application with vb.net codebehind. In the web.config
    the following settings are set for session state handling:

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

    It is a purchase management system, so when a user logs in, the
    application fetches his/her current purchases from a database located
    on a different server and shows them on the screen, together with all
    sorts of options of what one can do with the purchases.

    The problem I'm facing is that when a customer having a lot of
    purchases (I haven't figured out what the limit is yet) tries to do
    anything within the system after they are logged in, he/she gets kicked
    out of the system with the error message that the session has timed
    out.

    When debugging one can se that Sub Session_Start(ByVal sender As
    Object, ByVal e As EventArgs) in Global.asax.vb gets called when the
    user presses any key, so the Session is set to a new one, containing
    nothing. My application checks the session state on every page, and if
    it is empty, the user is redirected to the login page with the error
    message that the session has timed out.

    Does anybody know what it is that makes the application call Sub
    Session_Start(ByVal sender As Object, ByVal e As EventArgs) when a key
    is pressed in these situations?
    I've got a hinch that it has something to do with the time it takes to
    render the first page after logon and some sort of time out happens,
    but I can't find any information about it anywhere.

    I'm grateful for any input I can get on this one, so please please help
    me

    Thanks in advance

    Malin
     
    Malin, Jan 19, 2006
    #1
    1. Advertising

  2. Malin

    Malin Guest

    I've done a bit more research about this. What happens when a user logs
    in is that a number of rows is fetched from the database and stored in
    a dataset. For every row in this dataset an html row ("<TR><TD>bla
    bla</TD><TD>...</TR>") is created, and added to a StringBuilder. The
    StringBuilder is then turned into a string and the result is displayed
    on the aspx-page. Once the page is rendered the user cannot do anything
    within it without the application starting a new session and kicking
    him/her out. This only happens to the users having the most rows to
    fetch from the database, but even with them it is not a huge amount of
    data that is fetched. (At around 170 rows)

    Is there any limits in how much data a StringBuilder can contain? Or is
    there something else that might break or cause this unexpected
    behaviour? Memory leaks etc.

    I'd appreciate any help I can get, because I don't really know how to
    go about this right now.

    Thanks in advance

    Malin
     
    Malin, Jan 20, 2006
    #2
    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. Harry Simpson

    HELP! How to handle Session Restart on Logon

    Harry Simpson, Aug 14, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    406
    Guenther Liebowitz
    Aug 14, 2003
  2. Wes Jackson

    Session Restart

    Wes Jackson, Dec 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    384
    Wes Jackson
    Dec 8, 2003
  3. js

    Strange Session Restart

    js, Dec 8, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    460
  4. Replies:
    1
    Views:
    524
    Alvin Bruney - ASP.NET MVP
    Mar 3, 2006
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    308
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page