Hi experts,
A company is making a new web shop for our customer. The web shop is calling the NAV page 42 ("Sales Order") in order to create a new sales order and some lines on it.
When they use Wizdler in the Google Chrome browser, it works fine.
When they use their own code to call NAV, there are some "401 Unauthorized" http errors and one "400 Bad request". They don't get any other error messages.
They have made a web shop for one of our other NAV customers, but that was not NAV 2016.
They mention that they use http 1.1, but in the errors (see below) "Server: Microsoft-HTTPAPI/2.0" is mentioned. Could that be the problem?
They can easily create a customer using one of the other web services (standard NAV page 21).
If they don't send the customers address in the request, they still get the "401 Unauthorized" errors, but then they get the "200 OK" message - and they do NOT get the record with all it's fields as a result from NAV.
Can the size of the request be the problem?
I hope, you can help me.
----
* Expire in 0 ms for 6 (transfer 0x2496e641570)
* Trying 87.63.99.117...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x2496e641570)
* Connected to 87.63.99.117 (87.63.99.117) port 7047 (#0)
> POST /SC-NAVudv/WS/SC/Page/SalesOrderMon HTTP/1.1
Host: 87.63.99.117:7047
Accept: */*
Method: POST
Connection: Keep-Alive
User-Agent: PHP-SOAP-CURL
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:microsoft-dynamics-schemas/page/salesordermon:Create"
Content-Length: 1388
Expect: 100-continue
* Expire in 1000 ms for 0 (transfer 0x2496e641570)
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< Date: Mon, 21 Sep 2020 12:38:31 GMT
<
* Closing connection 0
* Issue another request to this URL: '87.63.99.117:7047/.../SalesOrderMon'
* Hostname 87.63.99.117 was found in DNS cache
* Trying 87.63.99.117...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x2496e641570)
* Connected to 87.63.99.117 (87.63.99.117) port 7047 (#1)
> POST /SC-NAVudv/WS/SC/Page/SalesOrderMon HTTP/1.1
Host: 87.63.99.117:7047
Accept: */*
Method: POST
Connection: Keep-Alive
User-Agent: PHP-SOAP-CURL
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:microsoft-dynamics-schemas/page/salesordermon:Create"
Content-Length: 1388
Expect: 100-continue
* Expire in 1000 ms for 0 (transfer 0x2496e641570)
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< Date: Mon, 21 Sep 2020 12:38:31 GMT
<
* Closing connection 1
* Issue another request to this URL: '87.63.99.117:7047/.../SalesOrderMon'
* Hostname 87.63.99.117 was found in DNS cache
* Trying 87.63.99.117...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x2496e641570)
* Connected to 87.63.99.117 (87.63.99.117) port 7047 (#2)
* Server auth using Negotiate with user 'md\spc-P'
> POST /SC-NAVudv/WS/SC/Page/SalesOrderMon HTTP/1.1
Host: 87.63.99.117:7047
Authorization: Negotiate TlRMTVNTUAABAAAAt4II4gAAAAAAAAAAAAAAAAAAAAAKALpHAAAADw==
Accept: */*
Method: POST
Connection: Keep-Alive
User-Agent: PHP-SOAP-CURL
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:microsoft-dynamics-schemas/page/salesordermon:Create"
Content-Length: 1388
Expect: 100-continue
* Expire in 1000 ms for 0 (transfer 0x2496e641570)
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate TlRMTVNTUAACAAAABAAEADgAAAA1goninzxN3h1PMPYAAAAAAAAAAJgAmAA8AAAACgBjRQAAAA9NAEQAAgAEAE0ARAABABAAUwBQAEMAMAAxAFUARABWAAQAGgBhAGQAbQAuAG0AbwBuAHQAZQBzAC4AZABrAAMALABTAFAAQwAwADEAVQBEAFYALgBhAGQAbQAuAG0AbwBuAHQAZQBzAC4AZABrAAUAGgBhAGQAbQAuAG0AbwBuAHQAZQBzAC4AZABrAAcACAC5b24dFJDWAQAAAAA=
< Date: Mon, 21 Sep 2020 12:38:31 GMT
<
* Closing connection 2
* Issue another request to this URL: '87.63.99.117:7047/.../SalesOrderMon'
* Hostname 87.63.99.117 was found in DNS cache
* Trying 87.63.99.117...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x2496e641570)
* Connected to 87.63.99.117 (87.63.99.117) port 7047 (#3)
* Server auth using Negotiate with user 'md\spc-P'
> POST /SC-NAVudv/WS/SC/Page/SalesOrderMon HTTP/1.1
Host: 87.63.99.117:7047
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAIwAAAA+AT4BpAAAAAQABABYAAAAEgASAFwAAAAeAB4AbgAAABAAEADiAQAANYKI4goAukcAAAAPbln7EAOxP3QHIRQJRjRKVW0AZABzAHAAYwAtAFAAYQBpAHIAeQBEAEUAUwBLAFQATwBQAC0AOABRAEgANwBDAEYAMwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACi3Fb8W8CxixCJ5BRVrJ0rAQEAAAAAAAC5b24dFJDWAXGCKHejia0AAAAAAAIABABNAEQAAQAQAFMAUABDADAAMQBVAEQAVgAEABoAYQBkAG0ALgBtAG8AbgB0AGUAcwAuAGQAawADACwAUwBQAEMAMAAxAFUARABWAC4AYQBkAG0ALgBtAG8AbgB0AGUAcwAuAGQAawAFABoAYQBkAG0ALgBtAG8AbgB0AGUAcwAuAGQAawAHAAgAuW9uHRSQ1gEGAAQAAgAAAAgAMAAwAAAAAAAAAAEAAAAAIAAAoHEBQytbdrWTzpkCv1CBBewomc3gz9/CsLBgIjt6jEYKABAAAAAAAAAAAAAAAAAAAAAAAAkAIgBIAFQAVABQAC8AOAA3AC4ANgAzAC4AOQA5AC4AMQAxADcAAAAAAAAAAAB0raGdbc6wBqaHfXAsHLfo
Accept: */*
Method: POST
Connection: Keep-Alive
User-Agent: PHP-SOAP-CURL
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:microsoft-dynamics-schemas/page/salesordermon:Create"
Content-Length: 1388
Expect: 100-continue
* Expire in 1000 ms for 0 (transfer 0x2496e641570)
< HTTP/1.1 400 Bad Request
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
< Date: Mon, 21 Sep 2020 12:38:31 GMT
* HTTP error before end of send, stop sending
<
* Closing connection 3
Hi Lars,
That was exactly what was needed! Thank you very much.
Best regards,
Morten
Hi Morten,
this is a bit of a guess so I hope you get ideas also from other sides, but check that "Use NTLM" is enabled in NST settings - this setting is disabled by default:
And the logs you provided mention "Negotiate", so there is a chance that you just need to tick this box.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148