Hello,
I am trying to render Line Chart on Windows Server 2003 environment which is my staging box. My chart is the aspx page which is in this folder D:\inetpub\wwwroot\bizcase30\rev\revcahrt.aspx. I also have ChartImages directory under rev folder.
This directory has Full Control on Network Service account and Full Control on ASPNET machine account. But yet when I try to render the graph I get the "A generic error occured in GDI+"My deployment scenario is File System. It is asking me to refer to KB article 5444.
The application bizcase30 runs part of a apppool. In the AppPool the property for Identity is set to Predefined - Network Service.
On my development box it renders properly since it is a XP box and the ASPNET machine account has fullcontrol on ChartImages folder.
Please help.
Thanks,
sorry for the delayed response, I just got back from a business trip & vacation.
try simplifying the problem by removing the chart and saving a normal image:
System.Drawing.Font arial = new System.Drawing.Font("Arial", 12f, System.Drawing.FontStyle.Bold); System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(250, 250); System.Drawing.Graphics gfx = System.Drawing.Graphics.FromImage(bmp); gfx.Clear(System.Drawing.Color.White); gfx.DrawString("Hello World", arial, System.Drawing.Brushes.Black, System.Drawing.PointF.Empty); bmp.Save(@"C:\test.png", System.Drawing.Imaging.ImageFormat.Png);
you can replace the path C:\test.png with the desired location of chart images. does an exception still occur?
Sorry, could not test your solution earlier. I did code according to your suggestion to generate the Test.png image. It threw the same error.
Your code did work on my development box which is a XP box. The staging box is a Windows Server 2003. It does not work on that box.