Search code examples
.netwcfiispdf-generation

Trouble Instantiating ActivePDF Toolkit Object in IIS


We've been having a lot of trouble trying to get ActivePDF Toolkit 2011 working on our server. It works fine on development machines and on the server within a test console app. However when we try to use it within our WCF service, it crashes throwing a SecureAccessViolation when trying to instantiate the object.

I've found alot of suggestions regarding fixes for it to do with configuring ActivePDF itself, but what puzzles me is why it works in our test application on the server and not through the service in IIS. The console app working means that we have installed ActivePDF correctly and the license is configured.

The server is running the latest updated version of ActivePDF. IIS8, x64 .Net 4.

Has anyone else had similar issues, or any idea why this may be occurring?


Solution

  • Older versions of ActivePDF Toolkit are 32-bit. To get it to run on a 64-bit server, you can set the App Pool to Enable 32-Bit Applications to True (the default is false). To do this, go into IIS, select the App Pool, right click and select Advanced Settings. In the Advanced Settings window, set Enable 32-Bit Applications to True. The below screenshot is from IIS7 (Win7 64-bit):

    enter image description here