I have written an aspx web app which generates a bitmap and then saves it to the images folder. The app works fine when I run it within VS 2005. When I browse to the application using a web url, I get a "Generic error occured in GDI+ when it tries to save the file. The line of code is

Code:
           imgPath = Server.MapPath("~/images/Brot.bmp")
<snip>
           PlotBmp(bmp, siz, rectD, 2, imax)
           bmp.save(imgPath)                              '<--Error occurs here.