I am trying to use Microsoft.Exchange.Webservices.dll in a Qaction for a driver that I am developing to connect to exchange emails. We are using DM version 9.6.12.0 and as per the documentation :
“From DataMiner 10.1.3 onwards, it is possible to reference DLLs starting with either "System." or "Microsoft." if they do not exist as default .NET assembly but do exist in the ProtocolScripts folder. Prior to DataMiner 10.1.3, the C:\Skyline DataMiner\ProtocolScripts and C:\Skyline DataMiner\Files folders are not searched, as prior to that DataMiner version, these are considered system DLLs.”
Can you please advise how Microsoft's DLLs that dont exist by default can be added and used in Dataminer.
The error that I am currently seeing in the Element logs is :
2021/07/07 14:17:28.995|SLProtocol - 18468 - Test Exchange Mail Notification|5740|CQAction::Run|ERR|-1|QAction [2] triggered by [pid=1/idx=-1/pk=/user=] failed. (0x8004022D) Input: new = <NULL> Input: old = <NULL> Input: extra = <NULL>
I have tried adding the file to C:\Skyline DataMiner\Files on the DM Server and restarted dataminer with no luck.
In Visual Studio I was initially getting an error "Could not find Dll" when the dll was referenced in DllImport. The error disappeared when I added the dll to C:\Skyline DataMiner\Files on my local machine.
Hi Jehad,
In earlier versions such as 9.6.12, the trick to get this to work is to rename the referenced DLL so that it doensn't start with "Microsoft." or "System." anymore, e.g. "MS.Microsoft.Exchange.Webservices.dll"
The driver XML will then have dllImport="MS.Microsoft.Exchange.WebServices.dll"
and the file "MS.Microsoft.Exchange.Webservices.dll" will need to be in the c:\Skyline DataMiner\ProtocolScripts folder.
Hi Saddam,
Support for QAction dllImport with “System.xxxx” and “Microsoft.xxxx” was added from versions 10.0 CU11 / 10.1.3 onwards.
I wouldn’t have expected DMA restart to break a driver. One thing you could still try would be to have both files (Sys.xxx) and (System.xxx) in the ProtocolScripts folder.
Hi Wouter,
Thanks a lot for the update.
I have this on DM 9.6.10 and DM 10.1.13 and both are having the same issue. I will try having both files on the server and hopefully, it will work fine
Hi Wouter,
Thanks for your the details.
We are using DM 9.6.10 and we are currently facing this issue with a DLL file. We followed the steps you provided but this keeps breaking every time we publish a new version of the driver or restart the DMA. Therefore, we rename the DLL file name to include the word “System” and publish the driver then rename the file to have the word “Sys” and then publish again!
Is there a better solution on how we get this resolved? Is there a hotfix to this issue?