0
我正在開發一個調用Dynamics Nav的多個Web服務方法的項目。它使用SOAP請求併發送響應xml來完成調用。C#動態導航Web服務無法獲得授權
我無法驗證到Web服務,因爲我得到如下回應:
- 響應{的StatusCode:401,ReasonPhrase: '未授權',版本:1.1,內容:System.Net .Http.StreamContent,頭: { 日期:星期四,2017年8月31日八時12分15秒GMT 服務器:HTTPAPI/2.0 WWW身份驗證:協商 的Content-Length:0 }} System.Net。 Http.HttpResponseMessage
我的憑據代碼示例是:
var credentials = Encoding.ASCII.GetBytes(usuarioText + ":" + passText);
client.DefaultRequestHeaders.Authorization = new
AuthenticationHeaderValue("Windows", Convert.ToBase64String(credentials));
我需要Windows身份驗證調用導航服務,我覺得我做錯事發的證書......