locked
Silverlight 4 WCF Duplex Service - How to configure for HTTPS RRS feed

  • Question

  • How do I configure my Silverlight app and duplex WFC service to use HTTPS? Currently evrything works if using HTTP, but as soon as the client hits the site using HTTPS, the callback creation within the service fails. I believe I need to modify my config file, but I can't figure out what it should be set to.

    Here is my current config:

     

     <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="">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              
              <serviceThrottling maxConcurrentSessions="2147483647" maxConcurrentInstances="2147483647" />
              <dataContractSerializer maxItemsInObjectGraph="2147483647" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    
        <bindings>
          <pollingDuplex>
            <binding name="myPollingDuplex" duplexMode="SingleMessagePerPoll" />        
          </pollingDuplex>
        </bindings>
    
        <services>
          <service name="UnityEca.Web.Services.SearchPollingService">
            <endpoint address="" binding="pollingDuplex" bindingConfiguration="myPollingDuplex" contract="UnityEca.Web.Services.SearchPollingService" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
          </service>
        </services>
    
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
          multipleSiteBindingsEnabled="true" />
      </system.serviceModel>


     

     

     

    From my Silverlight app, I create the client proxy like so:

    SearchPollingServiceClient client = new SearchPollingProxy.SearchPollingServiceClient(     new PollingDuplexHttpBinding { DuplexMode = PollingDuplexMode.SingleMessagePerPoll },     new EndpointAddress("../Services/SearchPollingService.svc")); 



     

    I would like to set my config so that the site is only accessable on SSL, but right now I can only get it working on HTTP.  Any help would be greatly appriciated.

     

    Thanks,

    Monday, February 7, 2011 11:53 AM

Answers

All replies