.NET interop created from ActiveX

xStepa
xStepa Member Posts: 106
edited 2018-02-27 in NAV Three Tier
Hi there,

i need to use an ActiveX dll on NST, so I need to convert it to dotNet. I tried to use tlbimp to convert it and at first it seemed, that I succeed. But NAV throws an error, that .NET framework object cannot be instantiated. All DLLs are on NST and accessible in development client. Has anyone some suggestion?


Thx

5111tyzxhqfe.png
ypv8yn6742j8.png
Regards
xStepa

Answers

  • lubost
    lubost Member Posts: 633
    Try to set property RunOnClient to Yes for variable AtouchDir.
  • xStepa
    xStepa Member Posts: 106
    Hi @lubost, I've tested also this option, but with the same result ...

    Thx
    Regards
    xStepa
  • lubost
    lubost Member Posts: 633
    - Check if your DLL is strongly signed.
    - If your code runs on client, you have to copy your DLL to publicly accessible folder (Add-ins folder in client folder is the best) - in that situation should be variable property RunOnClient set to Yes.
    - If your code runs on server, you have to copy your DLL to publicly accessible folder (Add-ins folder in server folder is the best) - in that situation should be variable property RunOnClient set to No.
  • xStepa
    xStepa Member Posts: 106
    Hi @lubost , thank you for your suggestions.

    No, the DLL is not strongly signed, but tlbimp allows this option - but this DLL is used only in codeunit, not as a control on page, so this should not be a problem

    Yes, I have also tested this option - I've copied it everywhere.

    Yes, the DLLs (.NET and original ActiveX) are on NST and I see them in DEV client.


    If you be so kind, you can test it yourself on your server - just try to construct AtouchDirClass ...
    Sorry to admins, that I've uploaded it as PDF ...


    Thx
    Regards
    xStepa
  • lubost
    lubost Member Posts: 633
    This is not my practice due to security reason. Sorry
  • xStepa
    xStepa Member Posts: 106
    no problem, thank you anyway :)
    Regards
    xStepa