HighTechTalks DotNet Forums  

problem in multi-user asp.net

Dotnet Framework (Performance) microsoft.public.dotnet.framework.performance


Discuss problem in multi-user asp.net in the Dotnet Framework (Performance) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Deep Silent Ocean
 
Posts: n/a

Default problem in multi-user asp.net - 10-07-2005 , 07:45 PM






Hi All

I am developing one Portfolio Management application where there is
single database shared by all the traders.

I have developed web-based application for this. I want to make this
multiuser application.

Following is the architecture of the application ...

Front End is developed in WebForms

Business Layerm : Represented by one Object
Database Layer : Represented by one Object
and Actual Database : SQL Server


Now, when I open two browser window and open Main-Entry form in both the
windows.


Now, when I deleted one transaction in one window and it gets updated in
database and that page gets refreshed and shows updated data.


now, in the second browser-window still there is stale data, now when i
select the same transactions which i deleted in the first window it
throws me error. it says that row is no longer there. That means DataSet
is shared by both the pages.

How, can I avoid that so that every opening of new windows gets its own
dataset ? or some log-in mechanisam which creates different session for
every user ...


I want to seperate out the user from each other so that individual user
can work on its own set of dataset ..


My Business Logic Layer and DbLogic Layer are seperate projects. Both
the layers are represented by one Object which i get from Factory pattern...

Following is the object creation sequence :

So invocation of Entry-Main Form.aspx creates one business object - >
business object inturn create dbutil object - > db util has dataset
within it which stores data coming out from stored procedure ...


Silent Ocean ...

Reply With Quote
  #2  
Old   
William Sullivan
 
Posts: n/a

Default RE: problem in multi-user asp.net - 10-31-2005 , 08:58 AM






Could be caused by a number of different things... Static objects are shared
across instances, so don't declare your datasets as static. Remember that
the cache is common to all users and the session is individual to each user.
If you store a dataset in the cache and then pass a reference to it to two
different users, they will be working on the same object. When a client
requests data, you should create a new dataset (typed is always easier to
create and use), have your database logic layer fill it from the database,
and then store it in the session to make it available across postbacks for
that user. Or, if you wish to reduce load on the database, you can create a
cache data layer that stores a local copy of the data in the cache. The
cache logic will return data from the cache, if available, or pass calls
through to the datbase layer if it is not. In order to 'unshare' data in
this shared cache, you can return a copy in the form of a dataview
(DataSet.DataTable.DefaultView.Copy())...

"Deep Silent Ocean" wrote:

Quote:
Hi All

I am developing one Portfolio Management application where there is
single database shared by all the traders.

I have developed web-based application for this. I want to make this
multiuser application.

Following is the architecture of the application ...

Front End is developed in WebForms

Business Layerm : Represented by one Object
Database Layer : Represented by one Object
and Actual Database : SQL Server


Now, when I open two browser window and open Main-Entry form in both the
windows.


Now, when I deleted one transaction in one window and it gets updated in
database and that page gets refreshed and shows updated data.


now, in the second browser-window still there is stale data, now when i
select the same transactions which i deleted in the first window it
throws me error. it says that row is no longer there. That means DataSet
is shared by both the pages.

How, can I avoid that so that every opening of new windows gets its own
dataset ? or some log-in mechanisam which creates different session for
every user ...


I want to seperate out the user from each other so that individual user
can work on its own set of dataset ..


My Business Logic Layer and DbLogic Layer are seperate projects. Both
the layers are represented by one Object which i get from Factory pattern...

Following is the object creation sequence :

So invocation of Entry-Main Form.aspx creates one business object -
business object inturn create dbutil object - > db util has dataset
within it which stores data coming out from stored procedure ...


Silent Ocean ...


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.