Opening a PowerPoint Presentation File Throws an Exception Randomly in C#

After upgrading to Aspose Slides .NET 22.7 we have started to notice the error shown in the provided screen shot:

image.png (31.2 KB)

When we try to recreate the issue with the same file locally things seems fine.

Do you have any suggestions or ideas for what is causing this exception?

Error in in production
Windows Server 2019

@ahthomsen,
Thank you for contacting support.

To investigate the case and help you, we need more details. Please try to isolate the problem and share the following files and information:

  • sample presentation file
  • code example that reproduces the error
  • stack trace of the error
  • .NET target platform in your app

Thanks for following up.

The issue seems to happen for various presentations (can’t share specific examples as they are sensitive).

Broader stack trace:

image.png (174.4 KB)

Code snippet that fails:

LoadOptions loadOptions = new()
{
    BlobManagementOptions = new BlobManagementOptions()
    {
        PresentationLockingBehavior = PresentationLockingBehavior.KeepLocked
    }
};

SentrySdk.AddBreadcrumb("RemoveDocumentProperties", "Before presentation open");

using Presentation presentation = new(tempFilePath, loadOptions);

Platform is .NET core 7.0

Its super hard to recreate :confused:

@ahthomsen,
Thank you for the additional information. Unfortunately, the information you provided is not enough. You should isolate the problem, it may not be related to Aspose.Slides. We also recommend that you use the latest version of Aspose.Slides for .NET.

Please also note that if you use the BlobManagementOptions.PresentationLockingBehavior property with the KeepLocked value, you should also set the IsTemporaryFilesAllowed property to true.