-
Nov 14th, 2012, 09:57 PM
#1
Thread Starter
Addicted Member
PollingDuplex doesn't work in IIS Express
I have a Silverlight 4 chat program that uses a WCF service with pollingDuplexHttpBinding.
The program works OK In:
* Cassini
* IIS Local Web Server
* All non-Duplex WCF Services work fine in any setting
But it does NOT work in IIS 7.5 Express. A call is made but a 500 HTTP error is given, and nothing happens (no exceptions are thrown, program just ignores it)
Here's my Web.Config
Code:
<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>
</services>
<extensions>
<bindingExtensions>
<!-- This is added when VS doesn't recognize the dll reference right away
<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>
<pollingDuplex>
<binding name="myPollingDuplex" duplexMode="MultipleMessagesPerPoll" >
</binding>
</pollingDuplex>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
-
Nov 18th, 2012, 03:30 AM
#2
Thread Starter
Addicted Member
Re: PollingDuplex doesn't work in IIS Express
Does anyone have any ideas? After some testing I know it's not a firewall issue. What's so different about iis local and iis express?
-
Nov 19th, 2012, 03:24 PM
#3
Re: PollingDuplex doesn't work in IIS Express
You could try to adjust the .config so the full error message is revealed, that might help
-
Jan 8th, 2013, 05:32 PM
#4
Hyperactive Member
Re: PollingDuplex doesn't work in IIS Express
I have never use pollingDuplex, but my I ask why you are using it? It seems harder to use than it is worth.
Since it is a chat application, when the server receives a message the server should push to the clients, which you can accomplish with simple duplex calls. Just define a callback on the service contract and make the operational contract that should update the clients one way. Then when you add a service reference to the client, it will automatically create the callback interface that you will have to flesh out.
With this you have a place for the service to "talk" to the client and you can also define events so when the callback gets a message, you raise an event the client is subscribed to.
If you REALLY want to use the polling, do as lighting suggests and get more detail on the error. Add a Trace to the config file and look it over.
Code:
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Error" propagateActivity="true">
<listeners>
<add name="ServiceTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Temp\MyTrace.log" />
</listeners>
</source>
</sources>
</system.diagnostics>
Last edited by wakawaka; Jan 8th, 2013 at 05:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|