Server Error in '/' Application.

A generic error occurred in GDI+.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:


Line 51:         g.DrawString(sayi.ToString(), font, Brushes.DarkRed, X, Y);
Line 52:         g.CompositingQuality = CompositingQuality.HighQuality;
Line 53:         bmp.Save(Server.MapPath("images/captcha.png"), ImageFormat.Png);
Line 54:     }
Line 55:     protected void sayikontrol(object source, ServerValidateEventArgs args)

Source File: d:\vhosts\aisguvenligi.com\http\iletisim.aspx.cs    Line: 53

Stack Trace:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +490077
   System.Drawing.Image.Save(String filename, ImageFormat format) +73
   iletisim.Guvenlik(Int32 H, Int32 W, String fonts, Int32 Punto, Int32 X, Int32 Y, String arkaplanResmi) in d:\vhosts\aisguvenligi.com\http\iletisim.aspx.cs:53
   iletisim.Page_Load(Object sender, EventArgs e) in d:\vhosts\aisguvenligi.com\http\iletisim.aspx.cs:32
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0