logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
TheImprover  
#1 Posted : Tuesday, May 22, 2018 8:21:43 AM(UTC)
TheImprover

Rank: Newbie

Groups: Registered
Joined: 5/22/2018(UTC)
Posts: 3
United Kingdom

I am trying to run the Patagames.pdf.dll library in a web service under IIS, but I keep on getting the PDFium.dll not found error.

It runs on my PC perfectly - but when I publish it, it won't run on the web server.

I have carefully checked the security properties on PDFium.dll to ensure it is executable by the application pool ID (and tried giving all users full access).

I have tried the following code to direct the server precisely to the DLL, and it's giving the correct location:

Code:
                string codeBase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
                UriBuilder uri = new UriBuilder(codeBase);
                path = Uri.UnescapeDataString(uri.Path);
                string base_path = Path.GetDirectoryName(path);
                base_path = Path.GetFullPath(Path.Combine(base_path, @"..\"));
                path = Path.Combine(base_path, @"pdfium.dll");
                PdfCommon.Initialize(null, path);


Any suggestions please?

Edited by user Tuesday, May 22, 2018 8:24:39 AM(UTC)  | Reason: Not specified

Paul Rayman  
#2 Posted : Tuesday, May 22, 2018 8:39:12 AM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,011

Thanks: 5 times
Was thanked: 121 time(s) in 118 post(s)
Did you read this topic?
https://forum.patagames....-to-load-DLL--pdfium-dll

Also make sure that used pdfium.dll has a bitness same as application pool (64/32 bit).

Edited by user Tuesday, May 22, 2018 8:46:40 AM(UTC)  | Reason: Not specified

TheImprover  
#3 Posted : Tuesday, May 22, 2018 9:50:39 AM(UTC)
TheImprover

Rank: Newbie

Groups: Registered
Joined: 5/22/2018(UTC)
Posts: 3
United Kingdom

Originally Posted by: Paul Rayman Go to Quoted Post
Did you read this topic?
https://forum.patagames....-to-load-DLL--pdfium-dll

Also make sure that used pdfium.dll has a bitness same as application pool (64/32 bit).


Thanks - it was the "bitness" of the application pool. :)

Working now.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.