web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Web service does not work when called from web shop

(0) ShareShare
ReportReport
Posted on by 555

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

I have the same question (0)
  • Verified answer
    Lars Lohndorf-Larsen Profile Picture
    on at

    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:

    pastedimage1600777301605v1.png

    And the logs you provided mention "Negotiate", so there is a chance that you just need to tick this box.

  • Morten Steengaard Profile Picture
    555 on at

    Hi Lars,

    That was exactly what was needed! Thank you very much.

    Best regards,

    Morten

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans