CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Sep 2008
    Location
    Suomi Finland
    Posts
    47

    Request for the permission of type 'System.Security.Permissions.FileIOPermission, msc

    I am using Itext sharp to create a pdf. I am adding an image and I keep getting this error

    Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    it is this bit of code that is causing this
    Code:
     ....  
       
     string imagepath = "C:\\BMSApplicationFiles\\PDFImages\\bullfrogWeb.gif";  
       
     //add the Image to the DOC  
      Image bullfrogImage = Image.GetInstance(imagepath);  
      bullfrogImage.ScalePercent(60f);  
      bullfrogImage.SetAbsolutePosition(10, doc.PageSize.Height - 36);  
      doc.Add(bullfrogImage);
    If i comment this out, the PDF builds and no errors are thrown (there is just no image)

    I don't understand cause all i am trying to do is read a file.

    The directory does have full permission granted to IISUser

    Any ideas why I am still geting this permissions error?
    Thank you
    Last edited by maitopoika; June 3rd, 2010 at 01:07 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured