Session variable value getting lost from global.asax

Discussion in 'ASP .Net' started by tharika_c, Sep 24, 2007.

  1. tharika_c

    tharika_c Guest

    Hi,

    We have a simple ASP.NET web application where one of the Session
    variables, called Session("SSO_ID") gets created and assigned a value
    (equal to the HTTP_HRID request variable value), inside the
    Session_Start event of the global.asax.vb file, since this variable is
    accessed by almost all the pages in the project. Besides this
    variable, there are other session variables which are set in the
    various aspx pages, as needed.

    This works perfectly fine in 95% of the users' machines, but for some
    of the users, strangely enough, the Session("SSO_ID") variable alone
    is losing its value when accessed on any page. This was identified
    after we turned on tracing and the trace results show that while all
    other session variables that were declared on the individual page
    still display their values, the SSO_ID variable alone shows up as
    blank, even though the HTTP_HRID request variable is populated fine.

    Again, even for the users who face this issue, the problem is not
    consistently reproducible and the variable seems to be working fine
    once in a while.

    The application is set up on a Windows 2003 server, with IIS 6.0.
    Also, the pages are loaded inside an iframe of a parent Siebel
    application.

    If anyone has faced similar issues or has an idea of how to resolve
    this, please let me know. We have tried playing around with client
    machine cookie settings, IE security settings etc. but have been
    unsuccessful in identifying the root cause of the problem. Help!

    Thanks,
    Tharika
     
    tharika_c, Sep 24, 2007
    #1
    1. Advertisements

  2. Normally values in session variables doesn't just disappear without
    reason. The most likely reason is that you actually have some code that
    removes the value.

    If it wasn't a code related problem, it's hard to see how only one of
    the session variables would be affected and not any of the others.

    One thing that you can try, is to create another session variable in
    Session_Start, before you create the SSO_ID variable. If that variable
    gets cleared instead of the SSO_ID variable, the problem is related to
    the order that the session variables are stored in the Session object. I
    would then look for a statement that uses a variable as index, and
    accidentally does something like Session[0]="".
    Client settings are not likely to have anything at all to do with the
    problem, at least not directly. The server variables never ever leave
    the server, so if any client settings would make any difference, it
    would have to be a secondary effect, i.e. the client settings affect
    some code on the server, which in turn changes the server variable.
     
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Sep 25, 2007
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.