我正在开发具有双工通信的WCF服务,并且遇到了一个问题,使得它无法通过我的开发机器上的本地主机进行工作。WCF双工服务中的SOAP安全协商错误
不管我做什么,它自带了以下错误:
{"Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/crpnyciis20e'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the EndpointAddress for the server."}
我服务的Web.config如下:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<protocolMapping>
<add scheme="http" binding="wsDualHttpBinding"/>
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
而我的客户的App.config中:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IMessagingService" 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">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint
binding="wsDualHttpBinding" bindingConfiguration="WSDualHttpBinding_IMessagingService"
contract="CTMessagingServiceReference.IMessagingService" name="WSDualHttpBinding_IMessagingService">
<identity>
<userPrincipalName value="nbdfp2k" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
任何想法我能做些什么来解决这个问题?如果有任何其他代码可以帮助诊断,请让我知道......其余的其他代码都不需要连接配置,我知道的。
是您在Active Directory域中的计算机?用户是否从该域连接到您的服务? –
是的,它在AD上。 Web服务当前正在服务用户帐户下的DEV IIS框上运行。 –
并且是服务域帐户的'nbdfp2k'名称? –