Caution against using System.Drawing namespace in ASP.NET
-
Hi all, I've noticed that almost all of you who do some kind of dynamic imaging in web applications use the System.Drawing namespace and it's descendants. Is it only me, or are the rest of you also closing your eyes real hard (while remembering to be extra careful about when and what to Dispise()... um... Dispose() in your app) when you come across the following text in the reference? Caution: Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. Are they serious, or is this just to avoid having to support people who don't realize that they run in a server environment and don't program defensively enough? Does anyone have any real world experience of high-volume sites getting away with using System.Drawing? I have a couple of low-volume sites going, and as I normally only invoke System.Drawing each time I need a size or format I've never seen before (all old renderings from original images are cached to disk), it really never gets stressed, so it sort of doesn't count... Peter, after midnight