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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Problem with UnlockKey on the Web server
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with UnlockKey on the Web server

 Post Reply Post Reply
Author
Message Reverse Sort Order
pmillsaps View Drop Down
Beginner
Beginner
Avatar

Joined: 31 Jul 09
Location: Waco, Texas
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmillsaps Quote  Post ReplyReply Direct Link To This Post Topic: Problem with UnlockKey on the Web server
    Posted: 15 May 18 at 4:00PM
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.
Back to Top
pmillsaps View Drop Down
Beginner
Beginner
Avatar

Joined: 31 Jul 09
Location: Waco, Texas
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmillsaps Quote  Post ReplyReply Direct Link To This Post 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.";
            }
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store