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.