Session restart problem

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

  1. Malin

    Malin Guest

    Hi everybody

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

    sqlConnectionString="data source=;Trusted_Connection=yes"

    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

    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

    Thanks in advance

    Malin, Jan 19, 2006
    1. Advertisements

  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, Jan 20, 2006
    1. Advertisements

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
    Guenther Liebowitz
    Aug 14, 2003
  2. Wes Jackson

    Session Restart

    Wes Jackson, Dec 8, 2003, in forum: ASP .Net
    Wes Jackson
    Dec 8, 2003
  3. js

    Strange Session Restart

    js, Dec 8, 2005, in forum: ASP .Net
  4. Replies:
    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
    Adam H. Kerman
    Jul 26, 2013

Share This Page