Developer forum

Forum » Integration » NAV Integration

NAV Integration

Suzette Cruz
Reply

Hi,

I try to check the documentation on how to install the code unit on NAV side as well as install DynamicWebConnectorService and DynamicWebServiceTestApp. The code unit successfully installed on NAV but when I try to connect the DW to the web service I got an error saying " The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'."

 I tried using the DynamicWebServiceTestApp it retrieves the data successfully. Both configuration are the same with the test app and the connector service. 

 

 

Thanks!


 

Replies

 
Dmitriy Benyuk
Reply

Hi Suzette,
Maybe the problem is in the right configuration to NAV? Could you check the NavEndpoint, Password, UserName in the DynamicwebService.exe.config file?
Do you have nav endpoint with http or https? What are your IgnoreCertificateWarnings, ClientCredentialType settings?
Also check the next options from the config file:
<!-- 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"/>
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

 

Thanks for the response.

Yes the Nav endpoint is reachable when I try to invoke it on the browser. Also for I tried to connect using the connector service tool and it is connecting.

For the settings, I tried to change the IgnoreCertificateWarnings to True

<!-- 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"/>

Still having the same issue on the integration module.

 

 

 

Regards,

Suzette

 

 

 

 

 
Suzette Cruz
Reply

Hello,

 

I am currently working in a different project and still having the same issue when I try to connect using the test app.

Error:

"The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate'."

 

Hope someone help me.

 

Thanks!

 

 

 
Dmitriy Benyuk
Reply

Hi Suzette,
could you check that: https://stackoverflow.com/questions/15570108/the-http-request-is-unauthorized-with-client-authentication-scheme-negotiate
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

 

Already checked that and do the configurations, but still having the issue.

 
Dmitriy Benyuk
Reply

Hi Suzette,
can you try with:
    <add key="ClientCredentialType" value="Windows"/>
And with others:
<!-- Valid options for ClientCredentialType are: Default, Ntlm, Windows, Basic -->
Is the error the same or a different one?
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

I tried to change that and I am getting the same error. 

 

 

 

Regards

 
Suzette Cruz
Reply

Hello Dmitriy,

 

I also tried to run the Batch integration but the error log says

 

2019-02-01 13:40:15.131 Starting scheduled task.  
2019-02-01 13:40:15.474 Request: <GetEcomData ><tables><Products type="all"/><Currencies type="all"/><Languages type="all"/><Manufacturers type="all"/><Units type="all"/></tables></GetEcomData>.  
2019-02-01 13:40:15.491 File: 'C:\DW9Projects\Applications\Files\System\Log\DataIntegration\NavDataImport20190201-1340151532293.log' doesn't exists  
2019-02-01 13:40:15.491 File: '' doesn't exists  
2019-02-01 13:40:15.491 The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'.  
2019-02-01 13:40:15.491 Scheduled task failed.

 

 

Thanks



 

 

 
Dmitriy Benyuk
Reply

Hi Suzette,
are you still able to connect to the NAV service using the tester tool?
If yes, could you check your tester tool config file options correspond to the DynamicwebConnector service config file options?
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

The tester tool is fetching data when I used the NAV Service Test. But when I try to use the Dynamicweb Service it has an error,

"Value cannot be null.
Parameter name: plainText"

 

Thanks

 

 
Suzette Cruz
Reply

Hello Dmitriy,

 

I think the issue with the connector test tool is now fixed, thanks for your help!

 

Although I am trying now to populate the database from NAV. When I run the batch integration an error occured.

" The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate'. "

 

Hope you can also help me to resolve this.

 

 

Best regards,

Suzette

 

 
Dmitriy Benyuk
Reply
Try different ClientCredentialType: Ntlm, Windows, Basic
 
Suzette Cruz
Reply

Hi Dmitriy,

 

Yes I tried it and change the DynamiwebService config file but same error found when I run the initial batch import from NAV to DW.

 

 


 

DW_issue_on_initial_batch_import.PNG
 
Dmitriy Benyuk
Reply

You need to try with
<add key="ClientCredentialType" value="Windows" />
set in the DynamicwebConnectorService.exe.config file

as this type is used when you are running the request from the tester tool under NAV service tab(where you said everything is fine)

 
Suzette Cruz
Reply

Hello Dmitriy,

I changed the value to "Windows" and still having the issue.

 

DW_config.PNG
 
Dmitriy Benyuk
Reply

Hi Suzette,
ok, could you check this https://forums.asp.net/t/1302832.aspx?The+authentication+header+received+from+the+server+was+Negotiate+NTLM+ and enable this option on your server?


Keep config file ClientCredentialType Windows(or try other types also if that will not work again)
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

 

The setup on the server is already on that. Please see attached screenshot. But still having the issue.

 

LM___NTLM.png
 
Suzette Cruz
Reply

Hello Dmitriy,

 

Here's the screenshot of the configuration of schedule taks under DynamicWeb. Kindly check if I'm doing it right, I am using the Integration framework 1 for this and trying to integrate on NAV 2018.

 

Also attached screenshot is the error when I try to run the inital import.

 

I also do the configuration on the IIS and server level as I sent the screenshots above this thread. Let me know If I missed somthing or needs to be change.

 

 

 

 

Best Regards,

Suzette

 


 

Batch_DW_1.PNG Batch_DW_2.PNG DW_Config_DW_side.PNG DW_error_when_initail_importing.PNG
 
Dmitriy Benyuk
Reply

Hi Suzette,
your task setup is incorrect. You need to use the Dynamicweb service url in the Webservice Url field but not the NAV server url.
So it should be like: http://localhost:8090/DynamicwebService
Regards, Dmitrij

 
Suzette Cruz
Reply

Hi Dmitriy,

 

Thanks for checking, the error message got a new log.  Please see attached screenshot.

Source Provider in the 'NavUserExport' activity is not XmlProvider

 

As I also check the log files under data integration folder,

2019-02-12 15:21:40.287: Start checking input files changing
2019-02-12 15:21:45.292: Finish checking input files changing
2019-02-12 15:21:45.292: reading configuration
2019-02-12 15:21:52.422: Starting import to temporary table for EcomLanguages.
2019-02-12 15:21:52.555: Added 47 rows to temporary table for EcomLanguages.
2019-02-12 15:21:52.555: Finished import to temporary table for EcomLanguages.
2019-02-12 15:21:52.619: Starting import to temporary table for EcomManufacturers.
2019-02-12 15:21:52.632: Added 68 rows to temporary table for EcomManufacturers.
2019-02-12 15:21:52.632: Finished import to temporary table for EcomManufacturers.
2019-02-12 15:21:52.687: Starting import to temporary table for EcomStockUnit.
2019-02-12 15:21:52.699: Added 149 rows to temporary table for EcomStockUnit.
2019-02-12 15:21:52.699: Finished import to temporary table for EcomStockUnit.
2019-02-12 15:21:52.760: Starting import to temporary table for EcomVariantsOptions.
2019-02-12 15:21:52.760: Added 14 rows to temporary table for EcomVariantsOptions.
2019-02-12 15:21:52.760: Finished import to temporary table for EcomVariantsOptions.
2019-02-12 15:21:52.824: Starting import to temporary table for EcomCurrencies.
2019-02-12 15:21:52.824: Added 50 rows to temporary table for EcomCurrencies.
2019-02-12 15:21:52.824: Finished import to temporary table for EcomCurrencies.
2019-02-12 15:21:52.890: Starting import to temporary table for EcomProducts.
2019-02-12 15:21:52.914: Added 151 rows to temporary table for EcomProducts.
2019-02-12 15:21:52.914: Finished import to temporary table for EcomProducts.
2019-02-12 15:21:52.971: Starting import to temporary table for EcomVariantGroups.
2019-02-12 15:21:52.977: Added 47 rows to temporary table for EcomVariantGroups.
2019-02-12 15:21:52.977: Finished import to temporary table for EcomVariantGroups.
 

 

Really appreciate your help!

 

 

Best Regards,

Suzette

 

 

 

DW_issue_on_initial_batch_1.PNG
 
Dmitriy Benyuk
Reply

UsersImport activity has strange DI job selected "Nav user export" which is probably wrong. The job which must be selected in this Users import option needs to be XML provider -> User/Dynamicweb provider job.
You can create this job from DI -> click New activity from Template -> choose ErpUserImport.
Regards, Dmitrij

 
Suzette Cruz
Reply

Hello Dmitriy,

I used the ErpUserImport and copy the template but I have different issue now,

2019-02-13 15:03:05.197 Batch failed.  
2019-02-13 15:03:05.197 Please check your website DNS settings  
2019-02-13 15:03:05.197 Url: http://localhost:8082/admin/public/webservices/integrationv2/JobRunnerBackground.aspx?logFile=TestUserExport20190213-1503051674091.log&jobsToRun=TestUserExport  
2019-02-13 15:03:05.197 Web exception occured: The remote server returned an error: (401) Unauthorized.  
2019-02-13 15:03:05.169

Starting batch

 

 
Dmitriy Benyuk
Reply

Hi Suzette,
please read the documentation http://doc.dynamicweb.com/documentation-9/integration/integration-framework-1/integration-framework and check your setup.
Regards, Dmitrij

 
Adrian Ursu
Adrian Ursu
Reply

Hi guys,

I usually get that error message when there is something wrong with the domain setup on IIS. I Have not figured out what is wrong, I just noticed it usually when there is a https access in the backend and the job is trying to access the http url.

If you copy that URL and open it in another window, your job will run. It's not the solution to your problem but it might help you check if the job runs correctly. 

I would still like to understand the root cause of this error but probably that's something for another post :)

Adrian

 

You must be logged in to post in the forum