G
Guest
Hi can someone please tell me why I keep getting the following error and how I might fix it!
...::ERROR::..
Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
The line causing the problem is outputImage.Save, but I really don't understand why, it works fine if I save the jpeg image in the wwwroot folder or even wwwroot/images but as soon as I make the folder structure any deeper I get the above error. Has anyone ever experience this before??? Can some please tell me how I fix the problem!!!
...::CODE::..
System.Drawing.Bitmap outputImage = new System.Drawing.Bitmap(origBitmap, newWidth, newHeight);
outputImage.Save(Server.MapPath(basePath + System.IO.Path.GetFileName(_FileName.Value)),System.Drawing.Imaging.ImageFormat.Jpeg);
statusinfo.InnerHtml = "Uploaded " + Server.MapPath(basePath + System.IO.Path.GetFileName(_FileName.Value));
Thanks for any help!
...::ERROR::..
Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
The line causing the problem is outputImage.Save, but I really don't understand why, it works fine if I save the jpeg image in the wwwroot folder or even wwwroot/images but as soon as I make the folder structure any deeper I get the above error. Has anyone ever experience this before??? Can some please tell me how I fix the problem!!!
...::CODE::..
System.Drawing.Bitmap outputImage = new System.Drawing.Bitmap(origBitmap, newWidth, newHeight);
outputImage.Save(Server.MapPath(basePath + System.IO.Path.GetFileName(_FileName.Value)),System.Drawing.Imaging.ImageFormat.Jpeg);
statusinfo.InnerHtml = "Uploaded " + Server.MapPath(basePath + System.IO.Path.GetFileName(_FileName.Value));
Thanks for any help!