Friday, July 2, 2010

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

While writing an image to a folder in C# , I faced error "System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+". There can be multiple reasons of this issue like insufficient permissions on the folder where we are writing the stream or not calling dispose() method on bitmaps. In my case it was permission related issue. I assigned read and write permission for IIS_WPG user group on the folder and it worked.

No comments: