我有一段时间弄清楚了这一点。我有一个WCF服务,我需要向Silverlight客户端提供信息,但是我需要一个控制台应用程序也能够参与此项。任何人都可以给我一个提示,告诉我的Web.Config应该看起来像指定控制台应用程序可以访问的附加绑定?当我觉得我得到的东西的工作的SL客户端将无法收到任何消息......WCF轮询双面绑定和非Silverlight客户端
这里是我当前的Web.Config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<extensions>
<bindingExtensions>
<add name="pollingDuplex" type="System.ServiceModel.Configuration.PollingDuplexHttpBindingCollectionElement,System.ServiceModel.PollingDuplex, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</bindingExtensions>
</extensions>
<behaviors>
<serviceBehaviors>
<behavior name="">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<!-- Create the polling duplex binding. -->
<bindings>
<pollingDuplex>
<binding name="myPollingDuplex"
duplexMode="MultipleMessagesPerPoll">
</binding>
</pollingDuplex>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name ="EdiManager.Web.EdiPubSub">
<endpoint address=""
binding="pollingDuplex"
bindingConfiguration="myPollingDuplex"
contract="EdiManager.Web.EdiPubSub"
/>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</service>
</services>
</system.serviceModel>
</configuration>
我知道这是我需要做的。问题是当我添加一个新的终端时,Silverlight客户端失聪,所以我希望有人可能会展示如何创建端点。我不知道我做错了什么。但我正在手动编辑配置。在星期六,当我再次尝试使用WCF服务编辑器时,它工作正常。所以我只需要记下我缺乏的技能!还是)感谢你的建议。 – 2010-11-08 13:54:54