Error: "Could not load file or assembly" while invoking function [Extension]

Error: "Could not load file or assembly" while invoking function [Extension]

  
Hi

"Could not load file or assembly 'file:///C:\OutSystems\Sandboxes\KD69V5013\Platform Server\running\IDCard\bin2\PublicDataParser.DLL' or one of its dependencies. An attempt was made to load a program with an incorrect format."

I have included PublicDataParser.DLL via Integration Studio to my application.

While invoking function PublicDataParserCreate with input parameter IDN_CN_base64 as "cAEAIOEBAA83ODQxOTg4NzYyNDk1NDXhAgAJMDY4NTYzODIxAAAA" (sample input hardcoded for testing), it throws the above metioned error.

Test:

https://sathishv10.outsystemscloud.com/IDCard/PersonDetailDetail.aspx?PersonDetailId=0&(Not.Licensed.For.Production)=

Click [READ] button.

Thanks

Regards
Sathish


Any Suggestion.
Hi,

That message can mean a couple different things. Here are the most usual:
  1. You used the x86 version of the dll's instead of the x64 versions.
  2. You did not include some dependency dll in you extension. You can use a tool like Dependency Walker to check what are it's dependencies.
  3. The dll requires other components installed in the machine (a native driver for example). This one will be hard to solve in a Personal Cloud environment, since it involves installing solftware there.

Regards,
João Rosado
Ok. Thanks João Rosado.

I'll check.
Hi,

Analysis:

1) You used the x86 version of the dll's instead of the x64 versions.
     PublicDataParser.dll (x64) - Throws error while importing actions from .Net Assembly Wizard.
     "'<path>\PublicDataParser.dll' is not a valid .Net Assembly"
    Whereas, x86 version dll extracts the Parser class from the dll.
2)  You did not include some dependency dll in you extension. You can use a tool like Dependency Walker to check what are it's dependencies.
     No dependencies for the dll.
3) The dll requires other components installed in the machine (a native driver for example). This one will be hard to solve in a Personal Cloud environment, since it involves installing solftware there
     Tried to copy the same dll to the path where it failed to load the dll. But still, i get the same error message
     "Could not load file or assembly 'file:///C:\Program Files\Outsystems\Platform Server\running\EID\bin2\PublicDataParser.DLL' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Any suggessions?

Regards
Sathish
Hi
After importing in the wizard using the x86 dll just replace it in the extension for the x64 dll.
In runtime it needs the 64bits versions for sure.

Regards,
João Rosado
Hi Satish,

Try to use the 'PublicDataParser.dll' from the '...\EIDA Toolkit\Samples\Website\dotNet\ZFDemoSite\bin'.

I had the same problem as yours and I got it working by using that .dll.

Let me know.

Shirad