Generic GDI+ error, maybe permissions

Discussion in 'ASP.NET 2.0' started by Joseph Jun, Jun 26, 2008.

  1. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    From what I've researched, the error usually is due a permission related issue but you may want to check your User/Quota Manager to make sure that the Anonymous ASPNet User has sufficient disk space.

    Winston

    DiscountASP.NET
     
  2. Thanks Winston, I am actually developing/testing this on my vista box at home. There is plenty of disk space andI have tried giving the "Everyone" read/write access to the directory and still the same error. very frustrating!
     
  3. I have been banging my head against the wall for about an hour now and cannot figure out why I am getting (or how to fix) the following error when I am trying to save a BitMap via a web app.

    System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+

    The code looks like this...

    Bitmap theWall = new Bitmap(Server.MapPath("~/App_Themes/Default/images/wall.jpg"));
    Graphics text = Graphics.FromImage(theWall);
    text.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
    text.DrawString(tbTeam.Text, new Font("Tahoma", 40), Brushes.White, new PointF(20, 20));
    theWall.Save(Server.MapPath("~/App_Themes/Default/images/wall.jpg"), ImageFormat.Jpeg);

    From what I have read this is a permissions issue but I can't seem to fix it. I'm running Vista Business, IIS7 and developing in Visual Studio 2008 (C#).

    Help would be greatly appreciated!!!!!!!!

    Rookie
     

Share This Page