On Thu, Mar 4, 2010 at 11:28 AM, Greg Keogh <[email protected]> wrote:

>  [cut] the MSDN 
> documentation<http://msdn.microsoft.com/en-us/library/system.drawing.aspx>suggests
>  you DO NOT use System.Drawing in services and ASP.Net
>
>
>
> Are you sure? Can anyone back this up? Not that I’ve done it much, but I’ve
> loaded images and done simple things like make thumbnails in services
> without problems. Images are just memory structures, and you don’t need a
> real HDC to load them, flip them, juggle the pixels, etc. Or am I forgetting
> something?
>
> Looking at the source on codeplex.com, Microsoft.Web.GeneratedImage.dll
does use these classes.  Being on codeplex.com doesn't make it "right".

According to the documentation, System.Drawing relies on GDI+ (gdiplus.dll).
   The documentation
<http://msdn.microsoft.com/en-us/library/ms533798.aspx>for GDI+ (and
System.Drawing) states:
GDI+ as a Service

GDI+ functions and classes are not supported for use within a Windows
service. Attempting to use these functions and classes from a Windows
service may produce unexpected problems, such as diminished service
performance and run-time exceptions or errors.

I know Windows Server 2008 R2 Server Core supports ASP.Net.  But does Server
Core support GDI+ and hence System.Drawing?  I'm not sure.
This<http://msdn.microsoft.com/en-us/library/ee391632(VS.85).aspx>implies
it
*might *work. I haven't got an environment to test.

I always* "read the label and use as directed".  YMMV.

>  Greg
>

*Save for those labels which recommend 2-3 "units" of alcohol per day,
unless "unit" can be mean"pint".

-- 
Richard Carde

Reply via email to