Session variable value getting lost from global.asax

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

  1. 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
    , Sep 24, 2007
    #1
    1. Advertising

  2. wrote:
    > 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.


    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]="".

    > 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!


    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.

    --
    Göran Andersson
    _____
    http://www.guffa.com
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Sep 25, 2007
    #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. khawar
    Replies:
    1
    Views:
    7,265
    GastonQ
    Jul 10, 2003
  2. Samuel Stanojevic
    Replies:
    1
    Views:
    931
    Samuel Stanojevic
    Sep 15, 2004
  3. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    787
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  4. =?Utf-8?B?QnJpYW4gV2FsdGVycw==?=

    ASP.NET 2.0 session cookie lost if global.asax is not present

    =?Utf-8?B?QnJpYW4gV2FsdGVycw==?=, Apr 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    3,703
    ddrib
    Feb 26, 2008
  5. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,131
    Mark Rae
    May 23, 2006
Loading...

Share This Page