We’re using the ASP.NET C# version of PDFLib at work to generate loads of reports and cool pdf files. Everything was peachy on our development systems until we deployed to staging servers and started getting a strange error.

All of the sudden we started getting the following exception on the site:

The specified module could not be found.
(Exception from HRESULT: 0x8007007E)

Not one of Microsoft’s more useful error messages, to be true and googling for that error returns so many diverse topics that they were completely useless.

So after a bit of troubleshooting, we came to the following solution tips. These should work for both C# and VB and any other .NET language. Tested on Windows 2003 and Windows Server 2008.

Make sure your webserver is 32-bit

PDFLib for .NET does not support 64-bit servers. In theory you could run your IIS worker processes in 32-bit on a 64-bit OS, but I leave that as an exercise to the reader.

Make sure you have .NET 1.1 installed

Because pdflib_dotnet.dll is built on 1.1 and you will have this installed on your development box, you will never think about this for your prod/staging servers. If you already have IIS installed before you run the 1.1 installer, don’t forget to register it with IIS:

C:\Windows\Microsoft.NET\Framework\v1.1.xxxxx\aspnet_regiis.exe -ir

Put the MSVCR71.DLL into your web bin directory

On your development machine (or wherever you have PDFLib actually installed) the msvcr71.dll will be in C:\Program Files\PDFlib\PDFlib 32-bit 7.0.3\dotNET\bin or thereabouts. Drop that into your website bin directory on the server.

UPDATE: You may also need to place this dll into the C:\Windows\System32 folder on a dedicated server.

Reboot, then check it out.

Taste the sweet goodness of success.

PDFLib produces a great end product (and it should for that much caaaassssshh). But it has many weird cases. Probably because it seems that the .NET version is just a simple crappy wrapper on the C library. Oh well. It’s still the best thing on the market to separate your developers from your designers.



COMMENTS / 6 COMMENTS

Thanks so much for figuring this out.
I tried for hours with no luck.
You would think that the folks at pdfLib would put something in their support site about this.

Ian Parks said on Dec 16 08 at 1:36 pm

Hi

Did you try using PDFLibNet in .NET Framework 4.0 (ASP NET with C#)? It throws an error when instantiating PDFWrapper p = new PDFWrapper()…something about “Method cannot be final”. I believe those methods should have been declared as virtual in the PDFLibNet source code. If you have a workaround for this problem, please let me know.

Thanks in advance.

Cosmin said on May 03 10 at 2:41 am

I just wanted to make everyone aware that after installing KB2416470, a security update recently released by Microsoft,this dll caused a website I was working on to fail. I am not positive as to why, but with this update, Microsoft may have gotten smarter around the idea of Visual C code wrapped with a .Net wrapper. This is of course just a hunch. However, I received the HResult error along with the exception “FileNotFoundException” while running the worker process in 32 bit mode and the dll being in the bin directory. Once I removed the dll, the site was back up and running. Luckily we were not using this dll any longer so it could be removed. Hope this helps anyone else looking into a similar issue.

Aaron Hayon said on Oct 07 10 at 11:06 am

Hai,
I used this PDFLibNet.dll is working for me in Win XP. Its not working for me in my Windows7 laptop. is that the 64bit issue? Any solution is there.? I tried to download and update dll, but its giving some other error. Could not assembly or something like that. Please help me.

Udhay said on Nov 22 10 at 9:16 pm

Hai,
I development PC(win xp) i have IIS and hosted there also. its working fine for me if i use localhost/IP address. But its not working from other PCs which is in the same network. any idea about that? what may be issue.? Please help me.

Udhayanan said on Nov 22 10 at 9:28 pm

SPEAK / ADD YOUR COMMENT
Comments are moderated.

Return to Top

PDFLib .NET Deploy Tip (specified module could not be found)

FRESH / LATEST POSTS

FRESH / Twitter Updates