I have asmx webservice and I need to check , if webservice is busy.
I'll ask ab开发者_如何学Cout it from my winforms client .
A way to achieve this would be to write some registry key value like:
HKEY_LOCAL_MACHINE\Software\Phenevo\WebService\<ThreadID>
..when your ASMX is entered, and remove the value when you're done. The WinForms code can simply count the number of values underneath the '..WebService' key - if there are more than 0, it's busy.
Unfortunately, it is not possible to have a static variable that you increment and decrement due to worker processes getting recycled.
精彩评论