2009-11-25 73 views
3

當我調用Bitmap.Save函數時,會發生此錯誤:「GDI +中發生了一般性錯誤」。當我從本地電話呼叫它工作,但是當我從另一臺電腦打電話時,會發生此錯誤。在 '/ jobnumber可以' 應用當我調用Bitmap.Save函數時發生錯誤「GDI +中發生了一般性錯誤」

服務器錯誤:

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.

異常詳細信息:

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

源錯誤:

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

堆棧跟蹤:

[ExternalException (0x80004005): A generic error occurred in GDI+.]
System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +377518 System.Drawing.Image.Save(String filename, ImageFormat format) +69
System.Drawing.Image.Save(String filename) +25
Assignment.CreateBitmapImage(String sImageText, Image Image1, JobInfo job_info_param) +124
Assignment.PrintButton_Click(Object sender, 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

+0

你的意思是「來自另一臺電腦的呼叫」是什麼意思? – Bobby 2009-11-25 13:53:31

回答

7

這通常表示在網絡用戶(IIS_USR例如)具有 沒有權利的數據保存到您要保存在Web服務器上的位圖文件夾。

我以前有類似的問題。檢查該文件夾在服務器上的訪問權限。 首先讓每個人都可以完全訪問該文件夾(只是爲了確保這是問題),然後再次縮小範圍,以便只有必需的用戶才能訪問。

相關問題