Slow server performance causes ASP page to Insert duplicate record

M

Ma-ke

I am making an insert call from an ASP.NET page to a SQL Server
database using an c# executereader call on a stored proc. When the
server is very busy, a single postback event (from a button click)
often results in duplicate records being inserted into the db. Although
this is difficult to reproduce on a debugging environment, peppering
the code with event log entries has shown that the actual c# code
calling the ExecuteReader method is executing twice. It therefore
appears that the entire page is reloading, but I have not verified
this.

This only appears to happen when the database insert sproc takes a
longer time to execute due to heavy server traffic. Has anyone ever
seen this behavior? Does anyone have any idea as to what could be
causing it?
 
P

Patrice

Try to check in the IIS log if you see multiple POST requests. IMO this
could be just that the user click on the submit button multiple times...
 
M

Ma-ke

Thanks for the suggestion Patrice. I have noted on some occassions
there are multiple posts for the page. Although these occassions do not
match exactly with when the duplicate records were created, they are
close. I am trying to find out the time zones of the various servers.

Question: I am confused about Get and Post. My only experience with
those terms are as the domain values for the "method" attribute of an
ASP form. However, in the IIS log they appear to be different. I can't
seem to find a stright simple answer. Do you have any insight on these
values?
 

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

Top