0
我使用帶有兩個端點basicHttpBinding和pollingDuplexHttpBinding的WCF。 在Silverlight 4中消費WCF。 如果我有單獨的基本..和投票..它的效果很好。但是,如果我在一個服務和一個silverlight項目中使用了這兩個項目,我在客戶端獲得了以下消息:服務參考配置中無法識別的元素'pollingDuplexHttpBinding'
「服務參考配置中無法識別的元素」pollingDuplexHttpBinding「請注意,Silverlight中只有一部分Windows Communication Foundation配置功能可用「。
WFC是對Silverlight項目的引用,但不起作用。 這裏是WCF的web.config文件:
<services>
<service behaviorConfiguration="Service1Behavior" name="Service1">
<endpoint
address=""
binding="basicHttpBinding"
bindingConfiguration="LargeBuffer"
contract="IService1"
listenUri="http://localhost:7007/Service1.svc">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint
address=""
binding="pollingDuplexHttpBinding"
bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="ILongService1"
listenUri="http://localhost:7007/Service1.svc/LongService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
,這裏是配置在客戶端:
<endpoint address="http://localhost:7007/ServiceWebTDM.svc/LongService"
binding="pollingDuplexHttpBinding" bindingConfiguration="multipleMessagesPerPollPollingDuplexHttpBinding"
contract="GXWebTDM.Web.ILongServiceWebTDM" name="LongServiceWebTDMDev" />
<endpoint address="http://localhost:7007/ServiceWebTDM.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IServiceWebTDM1" contract="GXWebTDMService.IServiceWebTDM"
name="ServiceWebTDMDev" />
我有t他在配置文件的兩邊。我不寫所有配置的WCF和客戶端。文章我紅色和獨自雙工輪詢工作,但與基本不工作。 – Musketyr 2011-12-15 09:03:04