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 39: 		Bitmap bm = oCaptcha.MakeCaptchaImage(sb.ToString(), 80, 24, "Arial");
Line 40: 		string url = Server.MapPath("~/Images/Uploads/Captcha.bmp");
Line 41: 		bm.Save(url);
Line 42: 		Img_Captcha.ImageUrl = "~/Images/Uploads/Captcha.bmp";
Line 43: 

Source File: d:\WEB\Tanay.net\TANAY\Contact\T\IK.aspx.cs    Line: 41

Stack Trace:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
   System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +566
   ENG_Contact_ContactForm.CreateCaptcha() in d:\WEB\Tanay.net\TANAY\Contact\T\IK.aspx.cs:41
   ENG_Contact_ContactForm.Page_Load(Object sender, EventArgs e) in d:\WEB\Tanay.net\TANAY\Contact\T\IK.aspx.cs:19
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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