A
Anthony Jones
Bob Barrows said:Michael said:Anthony Jones wrote:
It should be pointed out that this will affect all uses of
application locks. If the application is to contain other pages (not
connected with the problem in question) use application locks these
pages will be affected also. IOW the Application object itself can
be used as a single global mutex.
As clearly documented by Microsoft.
Personally I prefer Egbert's solution.
Certainly Egbert's is the most general solution. But no debugged code
was provided.
In it's favor, my suggestion is quick, easy to apply, clearly works as
designed by Microsoft and the tested code is provided above.
My suggestion will work until that mutex method is written and
debugged. Or even forever, if need be. [Yes, billions and billions of
ASP pages running until the _end_ _of_ _time_, bwaahaahaaahaaaa!]
My suggestion is certainly better than the two you suggested earlier:
1-enable debugging or
2-setting AspProcessorThreadMax to 1
which were both very amusing. Thanks for the laugh.
All in all, I think you're embarrassed that you missed this most
obvious suggestion, one designed by Microsoft. Reason I say that is
that, in the example you gave where you stored an object into the
Application object, you neglected to lock and unlock the Application
object, a common newbie error. Just a guess; I could be wrong, of
course.
Is there some history between you two here?
None that I''m aware of although I'll admit I am woefully lacking in the
social graces department so perhaps my blunt sounding posts may have upset
him at some point.
This is verging on being
insulting (perhaps even crossing the line), and Im not sure the insult
was called for.
Probably was. I was criticising his suggestion which clearly superior to any
of mine.
From what I could see, Anthony was expressing a
preference for a technique, not disparaging yours, which he did
acknowledge would accomplish the OP's purpose.
I am sure that Anthony is aware of the need to lock Application, and
simply left it out of his example because he was sure I was aware of the
need to do that as well.
Indeed it wasn't really needed for point being demonstrated.