Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

External Code Execution

Discussion in 'CRM / Helpdesk / App Integration' started by deyi, Mar 7, 2014.

Thread Status:
Not open for further replies.
  1. deyi

    Joined:
    Jun 28, 2013
    Messages:
    8
    Likes Received:
    0
    Hello,

    Can we use DotNet libraries which have dependencies to other DotNet libraries inside External Code Execution modules?

    We have been using simple SOAP connectors as external libraries to a great extend but now we have to include some functionality that requires to reference other DLLs.

    Thanks in advance,
    Regards
     
  2. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Re: Exterrnal Code Execution

    Sure, you just need to copy all the dependencies into the Libraries folder of your project, so they are deployed to the server too.
     
  3. deyi

    Joined:
    Jun 28, 2013
    Messages:
    8
    Likes Received:
    0
    Re: Exterrnal Code Execution

    Do I have to implement any additional settings with it ?

    I've copied two dependency dll files to the Libraries Folder but they are not getting deployed as I can't see them inside the output folders.

    I am getting the message ;
    Code:
    -------------------------------------
    2014-03-17 11:49:08.322
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'MongoDB.Driver, Version=1.8.3.9, Culture=neutral, PublicKeyToken=f686731cfb9cc103' or one of its dependencies. The system cannot find the file specified.
     
  4. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Maybe they're not automatically deployed to the 3CX server. Can you try manually copying the libraries to the destination folder?
     
  5. deyi

    Joined:
    Jun 28, 2013
    Messages:
    8
    Likes Received:
    0
    The same error occurs when I manually copy the dll files to output folders and deploy.
     
  6. VAD_Support

    VAD_Support Active Member

    Joined:
    Aug 6, 2009
    Messages:
    690
    Likes Received:
    0
    Then there are 2 possible causes:
    1) The library you're copying is a 32 bits DLL, and the web server requires a 64 bits DLL, or
    2) The library you're copying is a 64 bits DLL, but it has some other dependencies which are not copied.

    I have downloaded the CSharpDriver-1.8.3 from github, and it seems there are some dependencies for that libraries, like "libgsasl-7.dll". Is that DLL available? Can you creare a simple app with Visual Studio using MongoDB.Driver.dll and run it in the 3CX server? Do you get some error in that case?
     
Thread Status:
Not open for further replies.