首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么WCF让我在客户端的servicePrincipalName有一个空值?

为什么WCF让我在客户端的servicePrincipalName有一个空值?
EN

Stack Overflow用户
提问于 2011-09-15 22:49:29
回答 1查看 556关注 0票数 1

我正在尝试正确配置我们的WCF客户端的身份。目前,我将客户端的标识设置为<servicePrincipalName/>,但并未实际指定<servicePrincipalName/>的值。

我的问题是,这是一个有效的配置吗?我可以成功地使用客户端,但我不明白为什么WCF让我设置一个空的<servicePrincipalName/>

客户端上的端点如下所示:

代码语言:javascript
运行
复制
   <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‘配置如下所示:

代码语言:javascript
运行
复制
  <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如下所示:

代码语言:javascript
运行
复制
<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/>的都将不胜感激。

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-09-17 08:22:55

我认为WCF将你的配置理解为“我不关心谁在其他地方,只要他们在域名上”。当使用Kerberos时,完全省略元素并没有什么不同。

我认为如果您提供的值不匹配,它将失败。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7432847

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档