Free Support Forum -

PPTX to PDF Exception

I'm getting the following exception when trying to convert a PPTX file to PDF.

Inheritance security rules violated while overriding member: '..GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.


var presentation = new Aspose.Slides.Pptx.PresentationEx( documentStream );
presentation.Save( pdfStream, Aspose.Slides.Export.SaveFormat.Pdf );
Version: ( .NET v4.0.20926 )

Hi Anthony,

Thanks for considering Aspose.Slides.

I have observed the code snippet shared by you and it seems fine. Can you please share the source presentation with us for further investigation so that we may help you out further.

Thanks and Regards,

This is only happening with the .NET 4 Slides assembly. I was able to use the .NET 3.5 without any issues.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> I don’t know if it helps, but the project type is a .NET Silverlight application with a RIA service. Aspose is being used in a method in the RIA service.


Hi Anthony,

I regret to share that Aspose.Slides for .NET does not support Silverlight at the moment and it seems you are trying to do the same. An issue with ID 15846 has already been created in our issue tracking system for Silverlight support. This thread has also been linked with the issue so that you may be automatically notified once the issue is resolved.

Thanks and Regards,