Aspose.Powerpoint holding lock on image?



I have added a picture to a Powerpoint diagram via the Pictures.Add method, and am finding that aspnet_wp.exe is still holding a lock on this image.

The code which adds the image is very simple;

int picid = _presentation.Pictures.Add(new Picture(_presentation,
+ “/” + ConfigurationSettings.AppSettings[“PptImageFolder”] + “/” +

pf.PictureId = picid;

The error I’m receiving is;

The process cannot access the file
because it is being used by another process.

Has anyone encountered this before and is anyone aware of a way to ensure ASPNET will release the lock on the image? Thanks.



Dear Shaune,

Did you install last hot fixes? I’m not sure about ASP.Net but normal applications don’t lock
image files forever after 1.6.1 hot fix.