471,310 Members | 1,211 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

Urgent! Session State issue

Hi.

I developed an ASP.NET application that users just started testing and found
a huge problem with. In one part of the application I am creating an
instance of the class and save information that users provided there. If
users want to they can view their previously saved entries. At that time I
display the information to them. Another part of the application has
something similar except I save a dataview object that is declared globally
in the module for the duration of the session.

here is what happens: there were several people testing the application and
there were able to see each others data (from the class or the dataview
variable).

I thought that this information was local for the session. How does it work
and how can I make sure that it is only visible to the user who started the
session? Please help. Thanks.
Jul 21 '05 #1
4 1125

"David" <Da***@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Hi.

I developed an ASP.NET application that users just started testing and found a huge problem with. In one part of the application I am creating an
instance of the class and save information that users provided there. If
users want to they can view their previously saved entries. At that time I display the information to them. Another part of the application has
something similar except I save a dataview object that is declared globally in the module for the duration of the session.

here is what happens: there were several people testing the application and there were able to see each others data (from the class or the dataview
variable).

I thought that this information was local for the session. How does it work and how can I make sure that it is only visible to the user who started the session? Please help. Thanks.


I had a similar experience with any table that I was filtering. I solved it
by getting the dataview from a copy of the underlying table rather than the
table itself as follows.

dim dt as New datatable
dt = mgDataObjs.mgGetDataTable().copy()
dv = new dataview(dt)
dv.rowfilter ... etc

There may be other or better ways to solve this, but it worked for me.
Hope this helps.

Mike
Jul 21 '05 #2

I had a similar experience with any table that I was filtering. I solved it by getting the dataview from a copy of the underlying table rather than the table itself as follows.

dim dt as New datatable
dt = mgDataObjs.mgGetDataTable().copy()
dv = new dataview(dt)
dv.rowfilter ... etc

There may be other or better ways to solve this, but it worked for me.
Hope this helps.

Mike

I should point out that, in my case, I store the datatable in cache. My
understanding is when you filter the datatable, even from a dataview, it
changes the view of the underlying table data until it is unfiltered. I
would guess that you are caching your datatables.
Jul 21 '05 #3
Actually my problem is that I have several users that work on different
computers can see what others have stored in their local objects (classes,
moduals, public variables).

"vMike" wrote:

I had a similar experience with any table that I was filtering. I solved

it
by getting the dataview from a copy of the underlying table rather than

the
table itself as follows.

dim dt as New datatable
dt = mgDataObjs.mgGetDataTable().copy()
dv = new dataview(dt)
dv.rowfilter ... etc

There may be other or better ways to solve this, but it worked for me.
Hope this helps.

Mike

I should point out that, in my case, I store the datatable in cache. My
understanding is when you filter the datatable, even from a dataview, it
changes the view of the underlying table data until it is unfiltered. I
would guess that you are caching your datatables.

Jul 21 '05 #4
No one can help you if you don't post code that can reproduce this problem.

It sounds like you may have accidentally created a singleton

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"David" <Da***@discussions.microsoft.com> wrote in message
news:57**********************************@microsof t.com...
Actually my problem is that I have several users that work on different
computers can see what others have stored in their local objects (classes,
moduals, public variables).

"vMike" wrote:
>
> I had a similar experience with any table that I was filtering. I
> solved

it
> by getting the dataview from a copy of the underlying table rather than

the
> table itself as follows.
>
> dim dt as New datatable
> dt = mgDataObjs.mgGetDataTable().copy()
> dv = new dataview(dt)
> dv.rowfilter ... etc
>
> There may be other or better ways to solve this, but it worked for me.
> Hope this helps.
>
> Mike
>
>

I should point out that, in my case, I store the datatable in cache. My
understanding is when you filter the datatable, even from a dataview, it
changes the view of the underlying table data until it is unfiltered. I
would guess that you are caching your datatables.

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Tamir Khason | last post: by
7 posts views Thread by zeyais | last post: by
33 posts views Thread by dembla | last post: by
8 posts views Thread by ginnisharma1 | last post: by
1 post views Thread by alok sengar | last post: by
3 posts views Thread by N. Spiker | last post: by
1 post views Thread by rajesh.us.it.recruiter | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.