我找到了这个问题,但这似乎不是我的方式:(
我有客户端服务(控制台应用程序),在服务器侧 - bitrix cms网络服务。因此,一切都很好,但是当我有一天在我的VS 2012上更新服务时,通话发送(...)方法 - 我有错误:
Received from the server authentication header "NTLM". HTTP request is not allowed for client authentication scheme "Ntlm". Received from the server authentication header "NTLM".
(是Google翻译)
我尝试删除和重新创建服务,重新启动VS,重新启动Windows-它不起作用。
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>
所以,我的代码:
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;
我创建新的简单控制台应用并从Main App中粘贴一些代码 - 我有相同的错误。
请帮助我解决此问题。谢谢。
我没有有效的密码。所有作品。