PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 21, 2024 9:35 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Aug 23, 2011 11:41 am 
Offline

Joined: Tue Aug 23, 2011 11:23 am
Posts: 3
Hi,

I have recently started using PDFsharp and have run into an error.

I built my PDF library on a windows application first of all and everything worked fine, PDF built, and it looked great.

I've now moved that library over to my web application (running on local server) and it hits an error when trying to build the PDF.

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

Source of Error: XFont header = new XFont("Arial", 20, XFontStyle.Bold);

The application is running on 'Full Trust'.

Any ideas on the fix?

Thanks in advance!


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 23, 2011 3:45 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Which user account do you use for your application pool?
You can try System to see if it's a matter of insufficient privileges.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 24, 2011 9:26 am 
Offline

Joined: Tue Aug 23, 2011 11:23 am
Posts: 3
I just tried switching to System and it worked fine.

Can't see why it isn't working on ApplicationPoolIdentity though, I've given full access to all users including IIS. Any ideas?

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 24, 2011 2:26 pm 
Offline

Joined: Wed Aug 24, 2011 2:15 pm
Posts: 3
IIS shouldn't have full access to your application directory. Network Service is the account that ASP.NET "usually" uses to access the directory.

Does the Network Service directory have full access?

Does the AppPool identity account have full access?


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 24, 2011 2:44 pm 
Offline

Joined: Tue Aug 23, 2011 11:23 am
Posts: 3
Setting the Network Service user to have full rights against the dll seems to have solved it.

Thanks!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group