Я пытаюсь использовать веб-службу wcf и получил ошибку
Проверка подлинности не удалась для исходящего сообщения. Ожидаемая идентификация - это идентификация (http://schemas.xmlsoap.org/ws/2005/05/identity/right/possessproperty: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn)' для целевой конечной точки http://localhost/SCVMMService/VirtualMachineManagementService.svc'.
для использования веб-сервиса я использую код:
Client.ClientCredentials.Windows.ClientCredential.Domain = "testlab.ourcp.com";
Client.ClientCredentials.Windows.ClientCredential.UserName = "administrator";
Client.ClientCredentials.Windows.ClientCredential.Password = "M!ndMasT23";
Client.ClientCredentials.UserName.UserName = "administrator";
Client.ClientCredentials.UserName.Password = "M!ndMasT23";
Client.Open();
WebConfig:
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IVirtualMachineManagementService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/SCVMMService/VirtualMachineManagementService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IVirtualMachineManagementService" contract="ServiceReference1.IVirtualMachineManagementService" name="WSHttpBinding_IVirtualMachineManagementService">
<identity>
<servicePrincipalName value="DDC-SC-VMM02.testlab.ourcp.com\Administrator"/>
</identity>
</endpoint>
</client>
и в конфигурационном файле webService для идентификации:
<dns value="localhost"/>