NK-Inc.com
PDF Programming Tutorials

PDF Programming Tutorials

Programming Dynamic PDF forms using FDFToolkit.net

Tags: , | Categories: Web Presence Posted by NicK on 8/17/2008 3:57 AM | Comments (0)

We recently ran into a situation where a client was unable to use the FDFToolkit.net 2.0 component on a remote server. It worked fine on the testing server.

The error was:

System.Security.SecurityException: That assembly does not allow partially trusted callers

I looked up the error, and found out how to allow the server to trust our component.

SOLUTION: 

Since we have the source to our component, as well as the iTextSharp component all we had to do is make some minor changes and recompile.

We opened our sources, and inserted the following line into the AssemblyInfo.vb files for both FDFToolkit.net and iTextSharp:

< Assembly: System.Security.AllowPartiallyTrustedCallers() >

And we made sure the component has the full version information hardcoded in the assemblies.

< Assembly: AssemblyVersion("2.0.0.0") >

Recompiled both components, and the error message dissapeared.

Here's a link to iTextSharp & Partially Trusted web hosts solution: 

http://www.jwc3.net/2008/07/itextsharp-will-not-run-in-partially.html