简体   繁体   English

客户端身份验证方案“ Ntlm”不允许HTTP请求

[英]HTTP request is not allowed for client authentication scheme “Ntlm”

I found this question, but it seems like not my way:( 我发现了这个问题,但似乎不是我的方法:(

I have client service (console app), and at server side- Bitrix CMS web-service. 我有客户端服务(控制台应用程序),并且在服务器端-Bitrix CMS Web服务。 So, all works well , but when i update service someday on my VS 2012 and call Send(...) method- i got error: 所以,一切正常,但是当我有一天在VS 2012上更新服务并调用Send(...)方法时,我得到了错误:

Received from the server authentication header "NTLM". HTTP request is not allowed for client authentication scheme "Ntlm". Received from the server authentication header "NTLM".

(it is google translate) (这是谷歌翻译)

I try to delete and recreate service, restart VS, restart Windows- it is not working. 我尝试删除并重新创建服务,重新启动VS,重新启动Windows,但它不起作用。

So, app.config : 因此,app.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.serviceModel>
    <bindings>
     <basicHttpBinding>
       <binding name="CTfsTasksWSBinding">
         <security mode ="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="http://server.domen.local/tfs_tasks_ws.php"
    binding="basicHttpBinding" bindingConfiguration="CTfsTasksWSBinding"
    contract="Bitrix.CTfsTasksWSInterface" name="CTfsTasksWSSoap" />
</client>
</system.serviceModel> 
<connectionStrings>
 <add name="DefaultConnection" connectionString="Data Source = |SQL/CE|" />
</connectionStrings>
</configuration>

So, my code: 所以,我的代码:

 Bitrix.CTfsTasksWSInterfaceClient cll = new Bitrix.CTfsTasksWSInterfaceClient();
 cll.ClientCredentials.Windows.ClientCredential = new  System.Net.NetworkCredential(loginn, passwd);
 cll.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;

I create new simple console app and paste some code from main app- i have the same error. 我创建了一个新的简单控制台应用程序,并从主应用程序中粘贴了一些代码-我有同样的错误。

Please help me to fix this problem. 请帮助我解决此问题。 Thank you. 谢谢。

I have not valid password. 我没有有效的密码。 All works. 所有作品。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 HTTP 请求未经客户端身份验证方案“Ntlm”授权 - The HTTP request is unauthorized with client authentication scheme 'Ntlm' 使用客户端身份验证方案“ Ntlm”对HTTP请求进行了未授权。从服务器收到的身份验证标头为“ NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm' The authentication header received from the server was 'NTLM' HTTP请求未经授权使用客户端身份验证方案&#39;Ntlm&#39;。 从服务器收到的身份验证标头是“Negotiate,NTLM” - The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Negotiate,NTLM' HTTP请求未经授权使用客户端身份验证方案“Negotiate”。从服务器收到的身份验证标头是'NTLM' - The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'NTLM' 呼叫清单.asmx取得&#39;http要求是未经授权的客户端身份验证方案&#39;ntlm&#39; - call lists.asmx getting 'http request is unauthorized with client authentication scheme 'ntlm' 带有 .NET 核心的 SSRS 报告,HTTP 请求未经客户端身份验证方案“Ntlm”授权 - SSRS report with .NET Core, The HTTP request is unauthorized with client authentication scheme 'Ntlm' 调用 SAP PI Web 服务时,HTTP 请求未经客户端身份验证方案“Ntlm”授权 - The HTTP request is unauthorized with client authentication scheme 'Ntlm' while calling SAP PI web service 使用客户端身份验证方案“匿名”对HTTP请求进行未经授权的授权? - The HTTP request is unauthorized with client authentication scheme 'Anonymous'? 客户端身份验证方案“匿名”禁止HTTP请求。 3 - The HTTP request was forbidden with client authentication scheme 'Anonymous'. 3 HTTP 请求未使用“匿名”客户端身份验证方案授权 - The HTTP request is not authorized with the 'Anonymous' client authentication scheme
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM