无法与cURL和www-authenticate连接:协商

时间:2016-12-02 15:00:12

标签: curl dynamics-crm microsoft-dynamics navision

我正在尝试连接到MS Dynamics NAV Web服务。

我正在使用cURL

我正在提出像

这样的请求

curl http://server/NAV80/WS/CRONUS%20Company/Page/CustomerList -v --negotiate -u NAV\Test:T3st

在我得到的回复中

> GET /NAV80/WS/CRONUS%20Company/Page/CustomerList HTTP/1.1
> Host: x.x.x.x:x
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Server: Microsoft-HTTPAPI/2.0
* gss_init_sec_context() failed: : unknown mech-code 0 for mech unknown
< WWW-Authenticate: Negotiate
< Date: Fri, 02 Dec 2016 14:47:44 GMT

虽然设置--negotiate--ntlm参数,但仍然会收到401。如何正确连接以使auth成功?

任何帮助将不胜感激!

0 个答案:

没有答案