我有一个silverlight 4 聊天程序,它使用带有pollingDuplexHttpBinding 的WCF 服务。
该程序工作正常: * Cassini * IIS 本地 Web 服务器 * 所有非双工 WCF 服务在任何设置下都可以正常工作
但它在 IIS 7.5 Express 中不起作用。进行了调用,但给出了 500 HTTP 错误,并且没有任何反应(没有抛出异常,程序只是忽略它)
这是我的 Web.Config
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
</system.web>
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value ="DuelPortalOnlineTestPage.html"/>
<add value="ClientBin/DuelPortalOnline.xap"/>
</files>
</defaultDocument>
</system.webServer>
<system.serviceModel>
<services>
<service name="DuelPortalOnline.Web.ChatService" >
<host>
<baseAddresses>
</baseAddresses>
</host>
<endpoint address="" binding="pollingDuplex" bindingConfiguration="myPollingDuplex"
contract="DuelPortalOnline.Web.ChatService" behaviorConfiguration="duplexBehavior" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service name="DuelPortalOnline.Web.SQL_Webclient_Service">
<endpoint address="" binding="customBinding" bindingConfiguration="DuelPortalOnline.Web.SQL_Webclient_Service.customBinding0"
contract="DuelPortalOnline.Web.SQL_Webclient_Service" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<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="duplexBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="DuelPortalOnline.Web.SQL_Webclient_Service.customBinding0" >
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
<pollingDuplex>
<binding name="myPollingDuplex" duplexMode="MultipleMessagesPerPoll" >
</binding>
</pollingDuplex>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>