Developer forum

Forum » Integration » NAV integration - Value cannot be null. Parameter name: cipherText

NAV integration - Value cannot be null. Parameter name: cipherText

Kenneth Radoor
Reply

HI,

We are trying to setup an integration between DW and NAV, but get this error when we are calling the service: "Value cannot be null.
Parameter name: cipherText".

We are using DynamicwebConnectorService - 1.0.0.5 and it should be set up ok. including the windows service on the server at the customer.

We can call the service in a browser and get the default "DynamicwebService Service" responsepage.

Using the testapp we do get the expected response when using the "NavService Test"-tab.

But using the "Dynamicwebservice Test"-tab, we get the error, the same happens when trying to test from the site.

Digging aroung i can see the error is thrown when  the service tries to decrypt the requst-message, so it looks a bit like that, for some reason, the request-message gets stripped before it hits the connector.

There is no proxy-server infront of the connector, and there should not be anything in the firewall that should block the request.

the shared secret is also ok, as we get another error if we try to change it.

And as we can connect with the  "NavService Test", the other settings should be ok.

Does anybody have had this problem too, and know what to do.

I have made quite a few of this integrations before, and have never run into this problem before.

Thanks

Regards

Kenneth


Replies

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Kenneth,

Have you installed the right .net version? And have you installed the right service 32-bit vs. 64-bit?

Best regards, Anders

 
Kenneth Radoor
Reply

Hi.

There is the right .net frameworks on the server, that i have gotten checked.

I'll have to check what version og the connector they have installed.

Thanks

Best regards, Kenneth 

 
Kenneth Radoor
Reply

Hmmm

Now they have tried to installe the 64-bit version og the connector, and we get the same error.

the request is: <GetEcomData><tables><Products type="all"/></tables></GetEcomData>

the response is:

"Value cannot be null.
Parameter name: cipherText"

Any other ideas ??

 

Best regards, Kenneth

 

 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Kenneth,
this error is caused by passing an empty request xml to the Dynamicweb service.
Could you try to double check you are not sending an empty requests?
Regards, Dmitrij

 
Kenneth Radoor
Reply

Hi Dmitriy

That i have checked, please see the attached images.

Regards, Kenneth

Fiddler.PNG TestForm.PNG
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Kenneth,
another situation when it can throw the same error message is empty response returned from the ERP which is then is tried to be decrypted back on the Dynamicweb side using shared secret.
So could you check the ERP response is not empty string? If it is empty could you try to check with empty shared secret?
Regards, Dmitrij

 
Kenneth Radoor
Reply

hi

The response from the ERP is not empty.

If we in the DynamicwebConnectorServiceTestApp tries to make a request in the "NavService Test"-tab.
We do get a valid response. 

/Kenneth

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Kenneth,
could you check the Dynamciweb service config file?
<appSettings> ConnectorType should be set to the Nav connector type, "TestMode" to false, and also check the NavConnector section has the correct NavEndpoint?
Regards, Dmitrij

 
Kenneth Radoor
Reply

Hi 

They are

<appSettings>
<add key="ServiceName" value="DynamicwebService" />
<add key="testMode" value="False" />
<add key="TestOutputFile" value="D:\exportContent.xml" />
<add key="Secret" value="averysecretsecret" />
<add key="DebugInfo" value="True"/>
<add key="WebserviceURI" value="http://localhost:8090/DynamicwebService"/>
<add key="ErpConnectorType" value="NavConnectorAddInn.NavConnector"/>
</appSettings>
 
<NavConnector>
<add key="UserName" value="DWSVC" />
<add key="Password" value="adomainepassword" />
<add key="Domain" value="nodi" />
<add key="NavEndpoint" value="http://localhost:8047/NAVTEST/WS/Nordic%20distribution%20A%2FS/Codeunit/DWWebService" />
<!-- Set IgnoreCertificateWarnings to true for https endpoints using self-signed or untrusted certificates. Useful for testing. Should be avoided in production. -->
<add key="IgnoreCertificateWarnings" value="True" />
<!-- Valid options for ClientCredentialType are: Default, Ntlm, Windows, Basic -->
<add key="ClientCredentialType" value="Ntlm"/>
</NavConnector>
 
Anders Ebdrup
Anders Ebdrup
Reply
This post has been marked as an answer

It seems like you have misspelled: NavConnectorAddInn - you have a "n" to much in this: NavConnectorAddInn.NavConnector

Votes for this answer: 1
 
Kenneth Radoor
Reply

Thanks a million, now it all works.

Why is it we gets blind over the most likely errors

I need new glasses.

Regards

Kenneth

 
Suzette Cruz
Reply

Hi,

 

I also have the same problem but still having the error.

Here's the configuration file.

<NavConnector>
    <add key="UserName" value="user" />
    <add key="Password" value="pass />
    <add key="Domain" value="localhost" />
    <add key="NavEndpoint" value="http://localhost:11047/DynamicsNAV110/WS/CRONUS%20International%20Ltd./Codeunit/DWWebService" />   
    <!-- Set IgnoreCertificateWarnings to true for https endpoints using self-signed or untrusted certificates. Useful for testing. Should be avoided in production. -->
    <add key="IgnoreCertificateWarnings" value="True"/>
    <!-- Valid options for ClientCredentialType are: Default, Ntlm, Windows, Basic -->
    <add key="ClientCredentialType" value="Default"/> <!-- I also tried Ntlm, Windows and Basic here but got the same issue-->
  </NavConnector>
  <appSettings>
    <add key="ServiceName" value="DynamicwebService"/>
    <add key="testMode" value="False"/>
    <add key="TestOutputFile" value="c:\DW9Projects\exportContent.xml"/>
    <add key="Secret" value="secretkey"/>
    <add key="DebugInfo" value="True"/>
    <add key="WebserviceURI" value="http://localhost:8090/DynamicwebService"/>
    <add key="ErpConnectorType" value="NavConnectorAddIn.NavConnector"/> 

 

Can someone help me?

Using the test app, under NavService Test I retrieved the xml data. But on the DynamicwebService Test tab here's the response.

Value cannot be null.
Parameter name: plainText

 

 

Thanks

 

 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
probably you could have the same problem but with using wrong config file key names: "ErpConnectorType" was used in the old DynamicwebConnector service project(1.0.0.*).
But if you are using the DynamicwebConnector service 2.0.0.* you need to use "ConnectorType" instead.
Regards, Dmitrij

 
Suzette Cruz
Reply

Hello Dmitrij,

 

I check the downloads on the documentation and I did not see version 2.0.0.*

DynamicwebConnectorService - 1.0.0.5.zip 62 KB 01/09/2016
DynamicwebConnectorService - 1.0.0.6.zip 63 KB 16/11/2018
DynamicwebConnectorService x64 - 1.0.0.5.zip 60 KB 12/05/2017
DynamicwebConnectorService x64 - 1.0.0.6.zip 63 KB 16/11/2018
DynamicwebConnectorServiceTestApp - 1.0.0.5.zip 116 KB 01/09/2016

 

Best Regards,

Suzette

 

 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
It is on this page in the bottom of the Integration downloads list starting with an "Intregration v2" prefix.
What version have you donwloaded and are you using?
Could you check you have the NavConnectorAddIn.dll in the folder where you have setup/registered your Dynamicweb service?
Could you also check if there is any error information in the Winodws event viewer logs(after you are requesting data from the Dynamicweb service):
Start Winodws event viewer and open: Windows Logs -> Application and Application and services logs -> DynamicwebService?
Regards, Dmitrij

 
Suzette Cruz
Reply

Hello Dmitriy,

 

Yes both the Test app and the Dynamicweb Service have the NavConnectorAddIn.dll on their folders.

I checked the event viewer log, there's no DynamicwebService

 

 

Regards,

Suzette

 
Suzette Cruz
Reply

Hello Dmitriy,

 

Please also update the documentation part of the integration if the old connector test tool is not working anymore. 

 

 

 

Thanks!

Suzette

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
What version have you donwloaded and are you using?
Could you check what information do you have in the Winodws event viewer logs(after you are requesting data from the Dynamicweb service):
Start Winodws event viewer and open: Windows Logs -> Application
Do you see any information like that with a Source "Dynamicweb service?:


There is no need to update the documentation as the older connector tools are working as they were before.
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

This part of the documentation it is stated the still using the "ERPConnectorType" instead you said you use the "ConnectorType".

 

Please see attached file for the screenshot.

 

 

 

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
The documentation is already there. The article you link to describes how to work with Integration Framework V1(DynamicwebConnector service (1.0.0.*)), not the V2.
This article deals with the connector on Integration Framework V2: https://doc.dynamicweb.com/documentation-9/integration/integration-framework-2/testtool-connector-service
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

 

I am using the Integration Framework V1 but having issues. 

 

Here's the configuration file.

<NavConnector>
    <add key="UserName" value="user" />
    <add key="Password" value="pass />
    <add key="Domain" value="localhost" />
    <add key="NavEndpoint" value="http://localhost:11047/DynamicsNAV110/WS/CRONUS%20International%20Ltd./Codeunit/DWWebService" />   
    <!-- Set IgnoreCertificateWarnings to true for https endpoints using self-signed or untrusted certificates. Useful for testing. Should be avoided in production. -->
    <add key="IgnoreCertificateWarnings" value="True"/>
    <!-- Valid options for ClientCredentialType are: Default, Ntlm, Windows, Basic -->
    <add key="ClientCredentialType" value="Default"/> <!-- I also tried Ntlm, Windows and Basic here but got the same issue-->
  </NavConnector>
  <appSettings>
    <add key="ServiceName" value="DynamicwebService"/>
    <add key="testMode" value="False"/>
    <add key="TestOutputFile" value="c:\DW9Projects\exportContent.xml"/>
    <add key="Secret" value="secretkey"/>
    <add key="DebugInfo" value="True"/>
    <add key="WebserviceURI" value="http://localhost:8090/DynamicwebService"/>
    <add key="ErpConnectorType" value="NavConnectorAddIn.NavConnector"/> 

Using the test app, under NavService Test I retrieved the xml data. But on the DynamicwebService Test tab here's the response.

Value cannot be null.
Parameter name: plainText

 

 

Best regards,

Suzette

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
I've not received any answer from you on mine question regarding the log information. So I am copying it here once more:
Could you check what information do you have in the Winodws event viewer logs(after you are requesting data from the DynamicwebService Test tab/Dynamicweb service):
Start Winodws event viewer on the server where Dynamicweb service is registered and open: Windows Logs -> Application
Do you see any information like that with a Source "Dynamicweb service?:


If yes: look in the event error information
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

I already sent it. under the doc1.docx file I've sent yesterday.

 

Re-sending the file again. I can't paste the screenshot here so I just add it to a word document.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
the log shows that your Dynamicweb service can not be started.
Could you also let me know the details of the logs found in the MyNewLog section?

 
Suzette Cruz
Reply

Hello Dmitriy,

 

Please see attached file. The first image is the screenshot for the event viewer.

 
Suzette Cruz
Reply

Here's the updated one. 

 

 

Apologies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Suzette,
is your Dynamicweb service runnig?

Could you access it using browser?

 
Suzette Cruz
Reply

Hi Dmitriy,

 

Yes it is working and it is accessible via browser. 

 

Please see attached file for the Screenshot

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Ok, when you make a request to the service, what information is shown in the event viewer logs?
Are there other errors, or still the same one:"Service cannot be started. The service process could not connect to the service controller"?
What is written to the MyNewLog section?

 
Suzette Cruz
Reply

Hi Dmitriy,

 

Please see attached file.

 

 

Thanks!

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Can you send me your two config files:
1) the one you have at running the tester tool
2) the one you have in the folder where you have registered the DynamicwebService Windows service
to my email: dbe@dynamicweb-cms.com?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

You need to fix your DynamicwebService config file:
<appSettings>
    <add key="ServiceName" value="DynamicwebService" />
    <add key="testMode" value="True" />
    <add key="TestOutputFile" value="c:\DW9Projects\exportContent.xml" />
    <add key="Secret" value="test" />
    <add key="DebugInfo" value="True"/>
    <add key="WebserviceURI" value="http://localhost:8090/DynamicwebService"/>
    <add key="ErpConnectorType" value="NavConnectorAddInn.NavConnector"/>
  </appSettings>
Set:

    <add key="testMode" value="False" />

Votes for this answer: 1
 
Suzette Cruz
Reply

Hi Dmitriy,

 

It is now working. Thanks for the help. 

 

 

 

Regards,

Suzette

 

You must be logged in to post in the forum