Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Problem with UnlockKey on the Web server |
Post Reply ![]() |
Author | |
pmillsaps ![]() Beginner ![]() ![]() Joined: 31 Jul 09 Location: Waco, Texas Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 15 May 18 at 3:51PM |
I am trying to implement the QuickPDF on our web server to allow users to 'Decrypt' password'd files on demand. If I run the code on my local machine, it unlocks the PDF library, and works correctly. When I run the code after deployment to the Webserver running on Server2012R2, it fails on the UnlockKey portion of the code.
We own version 11.12, and that version was failing. So I tried downloading the newest version to see if it would work with version 15.11, but had the same exact results, ie, local version works fine, but it fails when deployed to the webserver. I modified the code a bit to match their article on the MVC version of the code, so here is the relevant code segments: string DLLprefix = "DebenuPDFLibraryDLL"; string DLL64prefix = "DebenuPDFLibrary64DLL"; string dllName; // Check to see if IntPtr size is 4. If 4 then it's 32-bit, if 8 then it is 64-bit. if (IntPtr.Size == 4) { dllName = DLLprefix + DPLVer.ToString("D4") + ".DLL"; // 32 bits } else { dllName = DLL64prefix + DPLVer.ToString("D4") + ".DLL"; // 64 bits } // Load the library from the Lib folder DPL = new PDFLibrary(Server.MapPath("~/bin/" + dllName)); // Check to see if library loaded successfully, LibraryVersion can be called before UnlockKey function is used if (DPL.LibraryVersion() != "") { // LibraryVersion has returned a result so lets display it on our web page string LibVer = DPL.LibraryVersion(); Output.LibraryVersion = LibVer; } else { // If this is returned then the library was not successfully initialized. Output.LibraryVersion = "version not found"; } if (DPL.UnlockKey(QuickPDF_LicenseKey) != 0) { } else { // If this is returned one of the following // things has happened: // 1. The library was not successfully initialized. // 2. The license key is not valid (either it is an // expired trial license key or it is a license key // for an older version of the library. logger.Info("Debenu Quick PDF Library could not be unlocked."); Output.DllUnlocked = "Debenu Quick PDF Library could not be unlocked."; } |
|
![]() |
|
pmillsaps ![]() Beginner ![]() ![]() Joined: 31 Jul 09 Location: Waco, Texas Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Of course I solved it right after I submitted the question. I had to 'Enable 32-Bit Applications' on the AppPool, and that seemed to fix it right up.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store