What we did:
We have created a C# class library project to talk to external webservices. When we check "register for COM interop" this DLL is automatically registered and ready for use on the PC where the registration occurred. The Navision client on that PC can then use an "automation" variable to find this DLL and use it.
What's the problem?
We need to rollout this DLL to the production environment. We're working with an RDP solution where the navision client runs on 2 RDP servers which our users use. This means that we only need to be able to deploy the DLL to these 2 servers. We have tried the following 2 solutions we've found here and on several blog posts:
- Drag the DLL to C:\windows\assembly (as administrator)
- Use the REGASM to register the DLL (REGASM ourDll.dll /tlb:ourDll.dll)
After having executed these we've found the DLL in Navision which we tried to initialize using a CREATE command:
CLEAR(ourDll);
CREATE(ourDll);
IF ISCLEAR(ourDll) THEN
CREATE(ourDll);
But after this we receive the following error (translated version):
This message is for C/AL programmers:
Could not create an instance of the OLE control or Automation Server identified by Automation Server with identification GUID={guid} 1.0:{guid}:'ourDll'.Consume
Verify if the OLE-control or Automation server was correctly installed and registered.
After this we tried to run GACUTIL /i ourDll.dll which installed our DLL into the GAC but the result remains the same. Since we've done this there's an errormessage:
The text is too long for the buffer.
However this error doesn't seem to stop navision of compiling. The error message on run stays the same as above.