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. So, all works well , but when i update service someday on my VS 2012 and call Send(...) method- i got error:
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.
So, 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.