Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session variable value getting lost from global.asax

Reply
Thread Tools

Session variable value getting lost from global.asax

 
 
tharika_c@yahoo.com
Guest
Posts: n/a
 
      09-24-2007
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

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      09-25-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System Session Variable VS. Own-declared 'Session' Variable chowchho ASP .Net 7 03-28-2008 02:38 PM
session variable getting lost SAL ASP .Net 18 03-28-2008 12:28 PM
Having trouble getting at the value of a Session variable =?Utf-8?B?dHBlcnJp?= ASP .Net 1 06-06-2005 11:11 PM
Re: lost session values, not Session Alvin Bruney [MVP] ASP .Net 0 03-02-2004 06:35 AM
Session contents lost despite Session.Timeout = 3000; and <sessionState mode="InProc" cookieless="false" timeout="300"> Carpe Diem ASP .Net 3 02-23-2004 07:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57