BadImageFormatException

Discussion in 'CRM / Helpdesk / App Integration' started by C.Koesling, Dec 12, 2016.

Thread Status:
Not open for further replies.
  1. C.Koesling

    Joined:
    Dec 12, 2016
    Messages:
    1
    Likes Received:
    0
    Hi everyone!

    I'm currently trying to build a ASP.NET web application that should implement features from the CallControl API.
    When referencing the 3cxpscomcpp2.dll however, I get a BadImageFormatException when I debug the app.
    I read the thread in which forum user Apereira discribed a similar problem (https://www.3cx.com/community/threads/error-using-omsamples.45436/) and tried to follow the steps that helped him, but to no end.

    The app is debugged on "any cpu", the .dll is referenced and set to local copy, I copied all .dll-files from the 3xc installation path to the debug folder.

    I'm quickly running out of ideas here. Does anyone have an idea where the problem might be?
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,454
    Likes Received:
    115
    Hi there,

    The BadImageFormatException is usually caused by an application running in 32 bits and the DLL is 64 bits or the other way around. The library "3cxpscomcpp2.dll" taken from the latest 3CX machine is x64. And it has a dependency on the library "sl.dll" which you also need. You can take these libraries from the 3CX installation directory. Ensure that you're getting them from the same 3CX server, and you don't have old DLLs from previous versions of 3CX.

    Kind regards.
    Ernesto.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.