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
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
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
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

 

You must be logged in to post in the forum