c# - How to avoid two different user submitting same request for the same person at the same time -


how avoid 2 different users submitting same request same person @ same time? helpdesk asp.net webforms app sql server backend.

i have transaction block in stored procedure insert request table.

but still when colleague , tested scenario in milliseconds our requests went through choosing same option validate duplicate in stored procedure.

first, need define logic comparing if 2 requests same.

from information gave us, variables can see (a) person (b) time. example, 2 requests considered same, if (a) belong same person id , (b) recorded within x minutes of each other.

however above rule generic , might result in loosing valid requests. suggest following:

  1. investigate why more 1 user can submit same request. frequency of such cases? reasons happens? knowledge might arrive @ different , better solution.
  2. check further variables add rule e.g. request type, application.
  3. if frequency of duplicate requests low, consider using generic rule , whenever detect duplicate, show user, , ask confirmation add or cancel new request.

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -