【发布时间】:2011-07-09 17:24:06
【问题描述】:
<configuration>
<system.serviceModel>
<bindings>
<ws2007HttpBinding>
<binding name="UnifyDataService" maxReceivedMessageSize="1048576">
<readerQuotas maxStringContentLength="32768" maxArrayLength="1048576" />
<security>
<transport>
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
</security>
</binding>
</ws2007HttpBinding>
</bindings>
<services>
<service behaviorConfiguration="AdoProxySite.AdoProxyBehavior"
name="Unify.TD.Runtime.Wcf.Server.AdoProxy">
<endpoint address="" binding="ws2007HttpBinding" bindingConfiguration="UnifyDataService"
name="UnifyDataService" contract="Unify.TD.Runtime.Wcf.Server.IAdoProxy" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="AdoProxySite.AdoProxyBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
上面显示的我的 WCF“Web.config”,我应该将“”更改为“”。怎么改?
【问题讨论】:
-
提供有关您的客户的详细信息以及它如何/在何处调用您的服务。您的服务使用带有 Windows 客户端凭据的消息安全性,因此您的客户端必须与服务位于同一网络/域中。您的 enpoint 还应该公开您的服务的身份。
-
我的客户端在同一个网络上。我在 2 个客户端上测试,一个可以连接到 WS,但另一个不能。
-
这两个客户端有什么不同:例如他们是同一个操作系统吗?都使用域帐户?同一个域?网络拓扑中的相同位置(例如,不涉及 VPN 隧道)?
-
为我解决的操作是将应用程序池标识从“ApplicationPoolIdentity”更改为“NetworkService”。
标签: .net wcf web-services