ASP.NET Learning Curve

Here is a particularly useful information on ASP.NET: Application Instances, Application Events, and Application State in ASP.NET.  This is the line that surprised me:

The ASP.NET runtime creates as many instances of application classes as needed to process requests simultaneously.  … Application instances are used in a thread-safe manner, that is, one request at a time.

Gee, thanks for that curve ball.  If you didn't know this before, now you know why application instance variables were behaving weirdly.  Yes, you were sleeping with her twin sister, so to speak.

Here is another one, this time from Dr. GUI: Am I Losing Memory?

A key reason that the Application object exists in ASP.NET is for compatibility with classic ASP code … consider storing data in static members of the application class rather than in the Application object.

This begs the question “Why limit oneself to 'static members of the application class' instead of just 'static members'?”  That's just a good way to add unnecessary dependencies.

BTW, it's funny how many pure ASP.NET applications are using HttpApplicationState.  Old habits die hard.