Hi Bill,
With your code, the chart should be saved in your current working directory. For most systems, the current working directory may be the directory that your program is running. Since the program you are using is the web server, it may be in the same directory as the web server executable (which is probably somewhere deep inside windows/system32). This assumes your web server (running as the anonymous user) has the privilege to write into the operating system directory.
I suspect your intention is to save the file in the directory that is mapped to your current URL path. To do this, please use the ASP.NET method Server.MapPath to convert your URL path to a file system path first. For example:
c.makeChart(Server.MapPath("Attendance.gif"));
Also, please make sure you have configured your file system security to allow the anonymous user (or the account that your ASP.NET is running under) to read/write to your directory, otherwise the file cannot be created.
For security reasons, some people will create a special "public" directory to store the image files, and only permit anonymous read/write access to that directory.
Hope this can help.
Regards
Peter Kwan |