我正在尝试正确配置我们的WCF客户端的身份。目前,我将客户端的标识设置为<servicePrincipalName/>
,但并未实际指定<servicePrincipalName/>
的值。
我的问题是,这是一个有效的配置吗?我可以成功地使用客户端,但我不明白为什么WCF让我设置一个空的<servicePrincipalName/>
。
客户端上的端点如下所示:
<endpoint address="http://w30-7wfjwh1/KDMSPartService/PartService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_LargeData"
contract="PartService.ICustomer" name="WSHttpBinding_ICustomer">
<identity>
<servicePrincipalName/>
</identity>
</endpoint>
客户端的'WSHttpBinding_LargeData‘配置如下所示:
<wsHttpBinding>
<binding name="WSHttpBinding_LargeData" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="99999999" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="128" maxStringContentLength="8192" maxArrayLength="163840000" 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" establishSecurityContext="true"/>
</security>
</binding>
该服务在名为'kdmsdev‘的域用户下运行。从服务导出的WSDL如下所示:
<wsdl:port name="WSHttpBinding_ICustomer" binding="tns:WSHttpBinding_ICustomer">
<soap12:address location="http://w30-7wfjwh1.internal.com/KDMSPartService/PartService.svc" />
<wsa10:EndpointReference>
<wsa10:Address>http://w30-7wfjwh1.internal.com/KDMSPartService/PartService.svc</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Upn>kdmsdev@internal.com</Upn>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
任何帮助更好地理解WCF是如何在客户端使用<servicePrincipalName/>
的都将不胜感激。
谢谢。
发布于 2011-09-17 08:22:55
我认为WCF将你的配置理解为“我不关心谁在其他地方,只要他们在域名上”。当使用Kerberos时,完全省略元素并没有什么不同。
我认为如果您提供的值不匹配,它将失败。
https://stackoverflow.com/questions/7432847
复制相似问题