Free Support Forum -

Exception when trying to save PPT or PPTX to PDF

I’m using Aspose.Slides and .NET 4.0. Every time I try to save a
powerpoint file (PPT or PPTX) using Presentation.Save or
PresentationEx.Save, I get an exception that says:

+ ex {“Inheritance
security rules violated while overriding member:
System.Runtime.Serialization.StreamingContext)’. Security accessibility
of the overriding method must match the security accessibility of the
method being
System.Runtime.Serialization.StreamingContext)”} System.Exception {System.TypeLoadException}

This appears to be related to changes in the security model in .NET 4.0.

Wade Peeler

I’ve attached a simple Visual Studio solution which exhibits this behavior. The exception is thrown for every ppt or pptx file. I am unable to convert any powerpoint document to PDF when targeting .NET 4.0.


Hi Wade,

I have worked with the project code shared by you and have been able to encounter the exception shared by you. An issue with ID 30320 has been created in our issue tracking system to further investigate and resolve the issue. This thread has also been linked with the issue so that you may be automatically notified once the issue is resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as 30320) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.