我有一个托管在 Windows 服务中并使用用户域帐户运行的 WCF。
我在该域中的所有客户端(控制台应用程序或 Web 应用程序)都运行良好。
我有一个不在域中不起作用的控制台应用程序。
这是错误:
Exception non gérée : System.ServiceModel.Security.SecurityNegotiationException:
L'appelant n'a pas été authentifié par le service. ---> System.ServiceModel.Fau
ltException: The request for security token could not be satisfied because authe
ntication failed.
这是 WCF 服务器配置:
<wsHttpBinding>
<binding name="TransactionalBind" transactionFlow="true"/>
</wsHttpBinding>
[...]
<endpoint address="http://machine.domain.fr:1083/MyService/"
binding="wsHttpBinding"
bindingConfiguration="TransactionalBind"
contract="MyService.IMyService"/>
[...]
<behavior name="MyBahavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
这是我的客户端配置:
<wsHttpBinding>
<binding name="WSHttpBinding_IMyService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="true" 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>
[...]
<client>
<endpoint address="http://machine.domain.fr:1083/MyService/"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
contract="wsArchi.IMyService" name="WSHttpBinding_IMyService">
</endpoint>
</client>
你能帮我吗 ?
非常感谢