Last post Apr 09, 2010 01:30 AM by vipindas
Apr 07, 2010 09:17 AM|NuNnDaDdY|LINK
I have a project which the following segment of code is used to convert an image uploaded by the user. Everything seems to work correctly on my machine when I am testing. But when I'm running the project after publishing it to the server I receive "A generic
error occurred in GDI+." Below is the method raising the error:
// This function will return the source image to a tiff format. If the format is .tiff, then the function just returns with success.
public bool Convert_Image_To_Tiff(string str_SourceFile, string DESTINATION_PATH)
if (Path.GetExtension(str_SourceFile).ToUpper() == ".tiff") //The file is already in the format we want
using (System.Drawing.Bitmap bitmap_Image = new System.Drawing.Bitmap(str_SourceFile)) //Convert a bitmap instance based on the source file
bitmap_Image.Save(DESTINATION_PATH, System.Drawing.Imaging.ImageFormat.Tiff); //Save this instance to the destination location and convert the format to that of a tiff
catch (Exception ex)
obj_Email.Send(obj_Email.Error_Email, "Error in Claims_Upload -> Convert_Image_To_Tiff()", ex.Message + "<br/><br/>" + ex.StackTrace);
Apr 07, 2010 10:58 AM|qwe123kids|LINK
Seems Permisiion Problem give me More Rights to IIS User and then Chk
Apr 07, 2010 11:39 AM|NuNnDaDdY|LINK
Thank you for your response. I'm not very familar with IIS and security with it. Under what tab for the website would I want to set the security and what values should I set this to? I believe I am running IIS 6.
Apr 08, 2010 12:27 AM|qwe123kids|LINK
Chk "read/write" Permisiion On IIS..
chk the above lin k
Apr 08, 2010 12:41 AM|Vipindas|LINK
Persmission issue. Go to website contro panel -> File manager Set write permission
Apr 08, 2010 09:45 AM|NuNnDaDdY|LINK
Turns out it was an issue with a folder not being found on the destination path. Why is it that a Generic GDI+ Error is raised here instead of a File Not Found or something similar?
Apr 09, 2010 01:30 AM|Vipindas|LINK