By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,314 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,314 IT Pros & Developers. It's quick & easy.

Concurrent visitors sent someone else's data

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
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

Nov 18 '05 #2

P: n/a
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" <an*******@discussions.microsoft.com> wrote in messag
news:F0**********************************@microsof t.com..
Hi all
I have an asp.net application exhibiting rather alarming behaviour. Amon 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 store The problem behaviour occurs when two users are editing the same type o data (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 problem I have searched fairly widely and have discovered other asp.net developer reporting 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 I am interested in hearing from anyone that has experienced simila problems and particularly if you have been able to find a solution Thanks for you help
Gu

Nov 18 '05 #3

P: n/a
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@73@hotmail.com
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

"Guy Penfold" <an*******@discussions.microsoft.com> wrote in message news:<92**********************************@microso ft.com>...
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.

Guy

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

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" <an*******@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
> 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
>>

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.