Concurrent visitors sent someone else's data

G

Guest

Hi all,

I have an asp.net application exhibiting rather alarming behaviour. Among other things, the application provides actors with an online profile that allows them to showcase their skills, photographs, experience etc. Basically it is an asp.net front end with SQL Server 2000 as the data store.

The problem behaviour occurs when two users are editing the same type of data (and therefore requesting the same aspx page). If they both submit their updates at exactly the same time only one version of the page is returned to both users. One of the users sees their updated data as expected, whereas the other sees someone else's information. Obviously this is unacceptable to the users and I need to find a way of fixing the problem.

I have searched fairly widely and have discovered other asp.net developers reporting similar behaviour, but have not found any satisfactory explanation of what might be causing the behaviour. Some have speculated that it might be due to load balancers and others that it is caused by the use of static objects stored in the session object. Neither of these are applicable in my case.

I am interested in hearing from anyone that has experienced similar problems and particularly if you have been able to find a solution.

Thanks for you help.

Guy
 
S

Simon Green

Are you using Output Caching in the page or control ? This could be the
cause


- Simon Green
InteSoft IT Ltd
ASPAccelerator - Fewer bytes, faster pages !
http://www.intesoft.net/aspaccelerator/


Guy Penfold said:
Hi all,

I have an asp.net application exhibiting rather alarming behaviour. Among
other things, the application provides actors with an online profile that
allows them to showcase their skills, photographs, experience etc. Basically
it is an asp.net front end with SQL Server 2000 as the data store.
The problem behaviour occurs when two users are editing the same type of
data (and therefore requesting the same aspx page). If they both submit
their updates at exactly the same time only one version of the page is
returned to both users. One of the users sees their updated data as
expected, whereas the other sees someone else's information. Obviously this
is unacceptable to the users and I need to find a way of fixing the problem.
I have searched fairly widely and have discovered other asp.net developers
reporting similar behaviour, but have not found any satisfactory explanation
of what might be causing the behaviour. Some have speculated that it might
be due to load balancers and others that it is caused by the use of static
objects stored in the session object. Neither of these are applicable in my
case.
I am interested in hearing from anyone that has experienced similar
problems and particularly if you have been able to find a solution.
 
G

Guest

You are spot on Simon. I had originally planned to allow the pages to be cached for a very short time period but for some strange reason I set VaryByParam="none" instead of varying the output cache by each user's unique ID value

Thanks for you help, I really appreciate it

Gu

----- Simon Green wrote: ----

Are you using Output Caching in the page or control ? This could be th
caus


- Simon Gree
InteSoft IT Lt
ASPAccelerator - Fewer bytes, faster pages
http://www.intesoft.net/aspaccelerator


Guy Penfold said:
other things, the application provides actors with an online profile tha
allows them to showcase their skills, photographs, experience etc. Basicall
it is an asp.net front end with SQL Server 2000 as the data storedata (and therefore requesting the same aspx page). If they both submi
their updates at exactly the same time only one version of the page i
returned to both users. One of the users sees their updated data a
expected, whereas the other sees someone else's information. Obviously thi
is unacceptable to the users and I need to find a way of fixing the problemreporting similar behaviour, but have not found any satisfactory explanatio
of what might be causing the behaviour. Some have speculated that it migh
be due to load balancers and others that it is caused by the use of stati
objects stored in the session object. Neither of these are applicable in m
case
 
A

Amber

I have experienced similar situations relating to posting of
information at the sametime to a database.

The way I have handeled this problems is to use a "IF EXISTS
STATEMENT" with MS SQL inside of a BEGIN - END transaction

I query on the identity and the DateTimeStamp down top the
millisecond. This way i can decide what piece of information needs to
be posted first or will rollback the transaction.

I normally inform the user with less presidence that another user has
updated will you like to see that changes.

Good advise - When handling voliatile information caching on not an
option

Obinna Igbokwe - Solution Architect/Developer
Email: oigbokwe@[email protected]
Microsoft Certified Solution Developer(M.C.S.D in ..NET)
Microsoft Certified Application Developer(M.C.A.D in ..NET)
http://www.investorquery.com Webmaster/Solution Architect/Developer
http://www.dedicatedsolutions.co.uk CEO
http://www.typing4less.net - Webmaster/Developer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top