We’ve been using the GTP.net control for some month now. I have selected the option to store on the hardrive the temporary images. Now i’ve realized that the gantt always generated new image and never delete the old one. So in our directory we have now over 100 000 images. I was thinking to delete those images before the rendering of our pages but since this is a website, many users could at the same time on the same page so i cannot delete thoses images. So is there a way to delete the old images ? I’ve tried to not store the images on the hardrive but then all the timeitem are blank. I’m sure there is a solution since this control is for ASP.NET but i just can find how i must configure it to not have this problem.
The recommended approach is to use the cache and GTPImg.aspx page to deliver images to the client. We introduced the store on disk option to work around limitations in IIS experienced by one of our clients. And currently the Gantt_ASP does not clean up the temporary images.< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
If you delete all the temp images, the once that are needed will be recreated on the next fetch. I agree that it will be (slim) chance to disturb the user experience if you delete some images just when Gantt_ASP has checked that they exists but the client has not fetched them yet. If this happens it will show up as missing images, but it will be fixed in the next postback.
One solution could be this: Create the TemporaryImagesOnDiskPath with todays date in it. Create a new directory for each day. Write code in your page that creates the directory for today if it does not exists and set TemporaryImagesOnDiskPath to it. Write code that deletes two days old directories and its content if it exists.
If you delete two days old images your are safe.