vnfdmhylcr
New Member
I am using aspose.slides.dll v6.4.0 to convert pptx files to pdf, my code is\[code\]public static MemoryStream pptx2Pdf(byte[] FileRead) { MemoryStream ResultStream = new MemoryStream(); Aspose.Slides.Pptx.PresentationEx pres = new Aspose.Slides.Pptx.PresentationEx(new MemoryStream(FileRead)); pres.Save(ResultStream, Aspose.Slides.Export.SaveFormat.Pdf); return ResultStream; }\[/code\]When control goes to pres.Save following exception is shown and file is not converted...Attempt by security transparent method 'ns3.Class115.smethod_6(System.Drawing.Imaging.BitmapData, Boolean)' to access security critical method 'System.Runtime.InteropServices.Marshal.Copy(IntPtr, Byte[], Int32, Int32)' failed.Assembly 'Aspose.Slides, Version=6.4.0.0, Culture=neutral, PublicKeyToken=null' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.I googled the internet but no help related to this exception was found.If someone has use this dll for conversion and can provide me some help..