Solved

A generic error occurred in GDI+. at System.Drawing.Image.Save

Posted on 2008-10-03
1
2,219 Views
Last Modified: 2008-12-29
i am using Windows Server 2008 with IIS7, so the previous solutions to this problem don't seem to apply. This code worked on windows 2003.  But something is different for windows 2008.  I am trying to save a bitmap image to a folder on the webserver using the c# code as follows:

newBitmap.Save("E:\\wpstore\\s_image\\test.png", ImageFormat.Png);

The error message is:
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at ASP.ecards_ecard_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer)


This error code is usually related to permissions for the ASPNET account.  However, IIS7.0 uses ASPNET account control in a different way.

I have looked at the physical path, the permissions, etc.  but apparently there is something different on windows server 2008 IIS7 that is preventing me from saving the image.

Does anyone have experience with Windows 2008 server IIS7.0 and saving images??


0
Comment
Question by:21wpnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 total points
ID: 22639786
give full right to the following users on the folder where you want ot save and then try again
IIS_IUSERS, IUSR_MachineName
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question