Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session mix-up issue

Reply
Thread Tools

Session mix-up issue

 
 
Benjamin Sunil
Guest
Posts: n/a
 
      01-21-2010
We ran into a strange issue 2 days back in our client's production
environment. A remote user, logs in and finds out that the data available in
the web page are from a different user. The client environement is having
..net 3.5 running on Windows 2003 server connected to an Oracle 10g DB. The
web server is on NLB and in a DMZ. The sessions are maintained In proc.

We analysed the IIS logs and the network logs for that duration and were not
able to conclude if this was a security issue or a genuine application
related issue.

Request your inputs in solving this issue.
 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      01-21-2010
Benjamin Sunil wrote:
> We ran into a strange issue 2 days back in our client's production
> environment. A remote user, logs in and finds out that the data
> available in the web page are from a different user. The client
> environement is having .net 3.5 running on Windows 2003 server
> connected to an Oracle 10g DB. The web server is on NLB and in a DMZ.
> The sessions are maintained In proc.
>
> We analysed the IIS logs and the network logs for that duration and
> were not able to conclude if this was a security issue or a genuine
> application related issue.
>
> Request your inputs in solving this issue.


The problem appears to be that you're using NLB so any server could respond
to the requests, but you're using in-process session state, so each server
has its own version of that session's state. You need to have one machine
looking after the session state for all the servers.

"ASP.NET Session State"
http://msdn.microsoft.com/en-us/library/ms972429.aspx

Andrew


 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      01-21-2010
Andrew Morton wrote:
> "ASP.NET Session State"
> http://msdn.microsoft.com/en-us/library/ms972429.aspx


Or the current version instead of the 10-year-old one:
http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

Andrew


 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      01-22-2010
your application probably stores session/request info in a static
variable (or vb module) so its shared between all requests.

-- bruce (sqlwork.com)



Benjamin Sunil wrote:
> We ran into a strange issue 2 days back in our client's production
> environment. A remote user, logs in and finds out that the data available in
> the web page are from a different user. The client environement is having
> .net 3.5 running on Windows 2003 server connected to an Oracle 10g DB. The
> web server is on NLB and in a DMZ. The sessions are maintained In proc.
>
> We analysed the IIS logs and the network logs for that duration and were not
> able to conclude if this was a security issue or a genuine application
> related issue.
>
> Request your inputs in solving this issue.

 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      01-22-2010
Benjamin Sunil wrote:
> We ran into a strange issue 2 days back in our client's production
> environment. A remote user, logs in and finds out that the data available in
> the web page are from a different user. The client environement is having
> .net 3.5 running on Windows 2003 server connected to an Oracle 10g DB. The
> web server is on NLB and in a DMZ. The sessions are maintained In proc.
>
> We analysed the IIS logs and the network logs for that duration and were not
> able to conclude if this was a security issue or a genuine application
> related issue.
>
> Request your inputs in solving this issue.


Same application being used by two clients at about the same time. The
session variables have the same names assigned being used in both
sessions with the application. In affect, they are using the same memory.

One user does a save, and the session variables are re-populated.
However, the other user does something to cause a postback, and now, the
user has the session variables information that were populated by the
other user.

The same application used by two or more users with session variables
can step on each other's session variables in a InProc with session
state in memory.

The way you get around this is that each session variable name should
have unique name base on some type of unique user information.

As an example, if a user has a userid, that would be the uniqueness
needed to segregate the session variables between the users.

SessionVariableName + userid -- on a concatenation of
SessionVariableName + userid will make the SessionVariableName unique to
the user's session.

The session variables will not be stepped on, if you make session-names
unique to the user.

 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      01-22-2010
Benjamin Sunil wrote:

<snipped>

I will say that it was happening with users that had the same
application opened twice in the same session that inproc session
variables were being stepped on, and the session variables were made
unique within the same session.

I recall now what I had to do to correct it.
 
Reply With Quote
 
Benjamin Sunil
Guest
Posts: n/a
 
      01-29-2010


"Andrew Morton" wrote:

> Benjamin Sunil wrote:
> > We ran into a strange issue 2 days back in our client's production
> > environment. A remote user, logs in and finds out that the data
> > available in the web page are from a different user. The client
> > environement is having .net 3.5 running on Windows 2003 server
> > connected to an Oracle 10g DB. The web server is on NLB and in a DMZ.
> > The sessions are maintained In proc.
> >
> > We analysed the IIS logs and the network logs for that duration and
> > were not able to conclude if this was a security issue or a genuine
> > application related issue.
> >
> > Request your inputs in solving this issue.

>
> The problem appears to be that you're using NLB so any server could respond
> to the requests, but you're using in-process session state, so each server
> has its own version of that session's state. You need to have one machine
> looking after the session state for all the servers.
>
> "ASP.NET Session State"
> http://msdn.microsoft.com/en-us/library/ms972429.aspx
>
> Andrew
>
>
> .
>


Thanks much Andrew, but strangely in another client instance of the
application, where there is no NLB, we faced the same issue. As explained by
Arnold, this may be due to the same session name being used that gets
populated to another user if there are accessing the application at the same
time.

Will explore on this, meanwhile if there are any inputs please do share as
it will be helpful in solving this at the earliest.

Thanks much,
Benjamin
 
Reply With Quote
 
Andrew Morton
Guest
Posts: n/a
 
      01-29-2010
Benjamin Sunil wrote:
> Thanks much Andrew, but strangely in another client instance of the
> application, where there is no NLB, we faced the same issue. As
> explained by Arnold, this may be due to the same session name being
> used that gets populated to another user if there are accessing the
> application at the same time.
>
> Will explore on this, meanwhile if there are any inputs please do
> share as it will be helpful in solving this at the earliest.


On the server not using load-balancing, does it happen to have Web Garden
set to use more than one worker process for the Application Pool
(Properties->Performance tab) for that web site? That has the same effect;
using out-of-process session state is imperative in that case. Or else much
"hilarity" ensues when we're testing.

Andrew


 
Reply With Quote
 
Benjamin Sunil
Guest
Posts: n/a
 
      02-01-2010
Hi,

Unfortunately, we encountered the same issue yesterday in the client
environment. User1 gets details of User2 who had logged in earlier in the
day. We have asked the client to disable the NLB for now and monitor for
re-occurrence of this issue.

Meanwhile will try out the session related solutions as advise.

If there are any more inputs please do share.

Thanks much.

"Mr. Arnold" wrote:

> Benjamin Sunil wrote:
>
> <snipped>
>
> I will say that it was happening with users that had the same
> application opened twice in the same session that inproc session
> variables were being stepped on, and the session variables were made
> unique within the same session.
>
> I recall now what I had to do to correct it.
> .
>

 
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
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or 'SQLServer'. Mike Larkin ASP .Net 1 05-23-2005 12:33 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM
Which is faster? Dim dv As New DataView(session("myDataTable")) or CType(session("myDataTable")) Andreas Klemt ASP .Net 1 07-23-2003 12:18 AM



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