Presentation.Save method produces "illegal characters in path" error

Hi, Support:
Here reports a serious bug for slides.dll v21.3.
The dll can open the ppt sucessfully.
but the dll will throw an exception that says “5 illegal characters in path” when save to hard disk, but there is no illegal character in path.

Hoe to fix this.
Test.zip (822.8 KB)

@ducaisoft,
Thank you for posting the query. Please check the issue using the latest version of Aspose.Slides. If the issue persists, please share and specify the following:

  • code example reproducing the exception
  • stack trace of the error
  • OS version where the exception occurs

I try the Slides Dll v21.7, the error is still there.
DEV is VS 2017
Windows 10 home edition
VB.net
Net4.6.1
111.png (17.7 KB)

I try the Slides Dll v21.7 in another OS, it’s OK!
DEV is VS 2008
Windows 7
VB.net
Net3.5
222.png (54.8 KB)

@ducaisoft,
Unfortunately, I was unable to reproduce this error on my side. It looks like the case does not depend on Aspose.Slides API. Please check the ability to save files to the “C:\Users\mkw\Desktop\PPT” folder.

Actually, there is no illegal character in the SavePath, what’s wrong about this exception?
Whereas, there is ok with the same code and file in another computer, what’s about this?
Maybe I need to erase my system disk and re-install OS?if so, it’s a terrible thing!

@ducaisoft,
Please try to use the next path format:

C:\\Users\\mkw\\Desktop\\PPT\\

If the issue persists, please use Path.GetInvalidPathChars and Path.GetInvalidFileNameChars methods to investigate your paths to the files on your side.

I try the C:\Users\mkw\Desktop\PPT\ path format, the issue is still on.
I use Path.GetInvalidPathChars and Path.GetInvalidFileNameChars to replace invalid char in the path to \ or space char, the issue is still on.

I do not know what cause this issue.
In another compute ,there is no issue for the same code and path file.
Why?

@ducaisoft,
Please test the code example below and check the myResult variable:

Dim filePath = "C:\Users\mkw\Desktop\PPT\test.txt"
On Error Resume Next
Dim emptyFile = new FileStream(filePath, FileMode.Create, FileAccess.Write)
Dim myResult = Err.Number & " " & Err.Description

Please check the results.


111.png (58.0 KB)

@ducaisoft,
Unfortunately, I was still unable to reproduce the error on my side. The issue may be related to the use of system folders in the path. Please check saving the presentation to “D:\Test” folder, for example.

I try what as you suggest, but the issue is still there.

111.png (40.9 KB)
Would you build me a special dll in which many breakpoints were set to message what’s wrong so that we could investigate what is the wrong?

@ducaisoft,
To my regret, we cannot do this. We need to reproduce the problem on our side to investigate the issue further.

Thanks. Hope your good news for fixing this issue soon.

@ducaisoft,
Please try to find out additional information about your environment settings that affect the reproducibility of this error.