Client config for webHttpBinding RRS feed

  • Question

  • I have a WCF service that uses webHttpBinding and SSL, with no authentication.  It works just fine from my web site's JavaScript.  I now want to create a WPF client for the same services.  When I attempt to add a service reference, the proxy gets generated just fine, but my app.config file does not get the configuration required to use the service.  Research has suggested that this is not unusual, so I've tried to create my own settings in the app.config. Unfortunately I've been unsuccessful so far, so I'm reaching out for help.

    My service class is marked with "ServiceContract" and "AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)", and the methods are marked with "WebGet" and "OperationContract".  My server side configuration ("web.config") is as follows:

          <service name="MySite.WebSiteSupport.Services" behaviorConfiguration="UnsecureServiceBehavior">
            <endpoint address="" binding="webHttpBinding" bindingConfiguration="webSSLBinding" contract="MySite.WebSiteSupport.Services" behaviorConfiguration="AspNetAjaxBehavior" />
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            <binding name="webSSLBinding">
              <security mode="Transport" />
            <behavior name="AspNetAjaxBehavior">
              <enableWebScript />
              <webHttp />
            <behavior name="UnsecureServiceBehavior">
              <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

    I've played around with a LOT of permutations and combinations on the client, and have yet to find something that works.  Any help would be much appreciated.



    • Moved by Fred Bao Friday, May 30, 2014 3:18 AM WCF Related
    Friday, May 30, 2014 12:44 AM


All replies