When I call the Bitmap.Save function, the error "General error occurred in GDI +" occurs

When I call the function Bitmap.Save, this error occurs: "A general error occurred in GDI +." When I call from localhost, it works, but when I call from another computer, this error occurs.

Server error in application "/ jobnumber":

A common 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 occurred in the code.

Exception Details:

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

Source Error:

An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the exception trace stack below.

Stack trace:

[ExternalException (0x80004005): A GDI +.]
System.Drawing.Image.Save(String , ImageCodecInfo, EncoderParameters encoderParams) +377518 System.Drawing.Image.Save( filename, ImageFormat) +69
System.Drawing.Image.Save(String ) +25
Assignment.CreateBitmapImage(String sImageText, Image Image1, JobInfo job_info_param) +124
Assignment.PrintButton_Click ( , EventArgs e) +271
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

+3
1

, - (, IIS_USR) , -.

. . ( , , ), , .

+7

Source: https://habr.com/ru/post/1723887/


All Articles