My site is with an ISP who locks down his shared servers strictly. I was able to get a text PDF created OK, but when I added a graphic across the bottom of the page the generator caused an error ... "The application attempted to perform an operation not allowed by the security policy. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
It is definitely caused by the graphic - when I took out the code that addded the image the problem went away.
...
Dim MyImage As Image = New Image(MapPath("~/Images/BDMFooter.bmp"), 0, 638, 0.43F)
MyImage.Align = Align.Left
MyTemplate.Elements.Add(MyImage)
...
Is there any way of adding graphics without venturing outside very tight security settings?
Permission for Images
Re: Permission for Images
Support · Jun 20, 2007Hello,
Our product code is fully 100% managed code but when adding BMP image formats, our product does make call to System.Drawing namespace of the .NET framework that most likely uses some unmanaged code. Our product does not parse the BMP image format. You may want to try using some other image formats like PNG, JPEG or GIF and that may solve your problem.
Thanks,
ceTe Software Support Team
Re: Permission for Images
Forum member · Jun 26, 2007Thank you. I replaced the .bmp with a .jpg and all is well.