||ADO.NET Connection Pooling Explained|
|Subject:||Slightly bad advice|
Response to: Slightly bad advice
A bit more information
You're right in saying ASP.NET is multi-threaded, but each request comes in on it's own thread and is seviced by a unique application instance. This means you don't have to concern yourself with MT issues - simply because all variables are local to your application instance. ASP.NET application objects are pooled and removed/returned to the pool upon each request/reply.
Shared/static variables will require protection from concurrent access. This is due to shared/static variables being maintained at the AppDomain level and not the Application level.
In the example of connection pooling a simple non-shared/static variable in the application object (initialized with the pool count) would be sufficient