2013-01-14 2 views
0

GDI +에서 일반 오류가 발생했습니다.일반 오류가 발생했습니다.

설명 현재 웹 요청을 실행하는 동안 처리되지 않은 예외가 발생했습니다. 오류 및 코드에서 시작된 위치에 대한 자세한 정보는 스택 추적을 검토하십시오.

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

소스 오류 : System.Drawing namespace

Line 69: 
Line 70:    // Save Thumbnail Image 
Line 71:    bmpResized.Save(strPath, fmtImageFormat); 
Line 72:    // Save big Images 
Line 73:    bmpBigResized.Save(strBigPath, fmtBigImageFormat); 
+0

무효 GridView1_RowDataBound 보호 더 설명 –

+0

(개체를 보낸 사람, GridViewRowEventArgs 전자)가 필요 { 경우 (e.Row.RowType == DataControlRowType.DataRow) { 속성 프로 = (속성) e.Row.DataItem; HtmlImage imgThumbnail = (HtmlImage) e.Row.FindControl ("imgThumbnail"); //imgThumbnail.Src = ("~/images/Desert.jpg"); byte [] bitimg = pro.Image1; System.Drawing.Image img = byteArrayToImage (bitimg); System.Drawing.Image imgBig = byteArrayToImage (bitimg); –

답변

0

클래스는 ASP.NET에서 지원되지 않습니다 :

Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions. For a supported alternative, see Windows Imaging Components.

사용 Windows Imaging Components 대신.

+0

이것은 내 전체 코드입니다. 실수가 있으면 감사하십시오. –

+0

@DeepakPandey - 아니요. – Oded

관련 문제