We have encountered a quite strange behavior when just loading and saving a Visio diagram. Using the exact same code-snnipet in a Console Application and a ASP. NET Web Application, the issue is present only in the latter.
string filePath = @"C:\FileStorage\TEST\GDP\GDP10067\GDP10067\1.vsdx"; string filePath2 = @"C:\FileStorage\TEST\GDP\GDP10067\GDP10067\2.vsdx"; Aspose.Diagram.License lic = new Aspose.Diagram.License(); lic.SetLicense("Aspose.Total.lic"); Aspose.Diagram.Diagram document = new Aspose.Diagram.Diagram(filePath); document.Save(filePath2,Aspose.Diagram.SaveFileFormat.VSDX);
What has been observed:
With the console application process still running after the Save() there is no READ lock on file
When invoked from an .aspx, running under w3wp.exe process , the input file is locked until the process is restarted.
I have found a workaround by loading the file first into a stream and then passing the stream to Aspose to load the diagram, but I believe that this is a bug.
I attached a sample file, and the last version of Aspose.Diagram,18.10, is used.
1.zip (36.4 KB)