jcouture300
Joined: 06 Dec 2008 Posts: 1
|
Posted: Sat Dec 06, 2008 2:56 am Post subject: Run PDFSharp in Medium Trust environment |
|
|
Hey guys, I know this topic has been touched on a few times before, namely:
-- http://pdfsharp.s3.bizhat.com/pdfsharp-ftopic305.html&highlight=medium+trust
-- http://pdfsharp.s3.bizhat.com/pdfsharp-ftopic26.html&highlight=medium+trust
-- http://pdfsharp.s3.bizhat.com/pdfsharp-ftopic25.html&highlight=medium+trust
...but I didn't really see any resolutions, plus the posts are a little old. Additionally, the first post says that the next version would work under medium trust and should be out in a "few months." Has that been released yet (doesn't appear so)?
Here's what I have done thus far. I have signed the project, and I have added "[assembly: AllowPartiallyTrustedCallers]" to AssemblyInfo.cs. After doing that, I don't get the normal trust issue error, but I get this:
-- Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I just migrated all of my customers to a new hosting provider. Moving to a different host isn't really an option. Is there ANY way to get this working under medium trust? To be clear, I cannot edit the Web server's config files in any manner (shared hosting -- not a dedicated server). So this has to be a solution that involves PDFSharp itself -- not changing the server configuration.
Thanks in advance,
JC |
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Dec 08, 2008 12:41 pm Post subject: |
|
|
That's not my area of expertise.
PDFsharp supports two modes: GDI+ mode and WPF mode (WPF mode is marked beta).
GDI+ doesn't provide font information to medium trust callers. That's why GDI+ mode cannot be used with Medium Trust.
I've heard from responsible team members that WPF mode should work with Medium Trust, but haven't tried it myself.
We'll convert some of our applications to WPF mode in the months to come. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|