re:
One of the flimsiest reasons to use Application.Lock.
I'd prefer to write to a text file which, even though it's also serialized,
creates far less contention than going through Application.Lock/Unlock.
There's a fairly decent sample you could adapt here :
http://www.asp101.com/samples/counter_aspx.asp
And there's another sample here :
http://www.codeproject.com/aspnet/EasyHit.asp
Adapt either one. Either that, or use a commercial counter.
Use *anything*, except code that uses Application.Lock/Unlock.
;-)
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
Well see....we had a huge bottleneck where the server rose up to 94%
usage and it was due to an application.lock command in a global.asa
file. It is for a visitor counter...- Hide quoted text -
- Show quoted text -