?
Solved

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

Posted on 2008-10-03
1
Medium Priority
?
2,232 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 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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 brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 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