I have an asp.net web service running on a web server with one of the web methods (wm) that does some processing based on a parameter (param).
I want to restrict concurrent calls to this web method only in certain cases--namely when the value of param passed by client1 is equal to param passed by client2.
I was thinking of adding some validation to the beginning of wm to check for the conditions before processing starts.
My questions are: 1) How can I find out from within my web method, if there is another instance of the web service calling the same web method being executed. 2) How can I get access to the parameters passed to my webmethod across various concurrent instances of the webservice while they are running.
I want to avoid database logging because in case the server goes down the log may not be updated (unless there is a good way to deal with this possibility)
Thanks for your help.