[英]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.