none
Configuration of deployment for RESTful WCF service to be invoked through Load Balancer RRS feed

  • General discussion

  • First off, sorry if this is in the wrong forum; I couldn't find a category that matched the situation.

    I have a secure SOAP/REST WCF service that I have been trying to configure so that it works through SSL offloading via F5.  I've looked into a number of issues with this online and, as usual, none of the solutions provided actually solved my dilemma. 

    Basically once I deploy the service, I try to access it through the browser but the WSDL link does not work and the REST help page throws error 404.  If I bypass F5, I can reach the service no problem.  And if I set the service to HTTP, I can reach the service through SSL offloading.  But I need the service to remain HTTPS only and it needs to go through SSL offloading.

    Any suggestions?

    Here is my web.config.

    <?xml version="1.0"?>
    <configuration>
    
      <appSettings>
        <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
      </appSettings>
      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <httpRuntime targetFramework="4.5"/>
        <customErrors mode="Off" />
      </system.web>
      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
          <binding name="SOAPBindingSSL" maxReceivedMessageSize="655360">
            <security mode="Transport">
              <transport clientCredentialType="None" />
            </security>
          </binding>
          </basicHttpBinding>
          <webHttpBinding>
            <binding name="RESTBinding" allowCookies="true" maxReceivedMessageSize="655360" />
            <binding name="RESTBindingSSL" allowCookies="true" maxReceivedMessageSize="655360">
              <security mode="Transport">
                <transport clientCredentialType="None"/>
              </security>
            </binding>
          </webHttpBinding>
        </bindings>
        <services>
          <service name="County.Lookup.REST_CountyLookup">
    <endpoint address="secure" binding="webHttpBinding" bindingConfiguration="RESTBindingSSL" contract="County.Lookup.IREST_CountyLookup" behaviorConfiguration="web" />
    <endpoint address="mexSecure" binding="mexHttpsBinding" contract="IMetadataExchange" />
            <endpoint address="soap" binding="basicHttpBinding" bindingConfiguration="SOAPBindingSSL" contract="County.Lookup.IREST_CountyLookup" />
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
          <endpointBehaviors>
            <behavior name="web">
              <webHttp helpEnabled="true" />
            </behavior>
          </endpointBehaviors>
        </behaviors>
        <protocolMapping>
            <add binding="basicHttpsBinding" scheme="https" />
            <add binding="webHttpBinding" scheme="https" bindingConfiguration="RESTBindingSSL" />
        </protocolMapping>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" >
          <baseAddressPrefixFilters>
            <add prefix="http://sbiqa.domain.com/"/>
            <add prefix="https://sbiqa.domain.com/"/>
          </baseAddressPrefixFilters>
        </serviceHostingEnvironment>
        <standardEndpoints>
          <webScriptEndpoint>
            <standardEndpoint name="" crossDomainScriptAccessEnabled="true" />
          </webScriptEndpoint>
        </standardEndpoints>
      </system.serviceModel>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
        <directoryBrowse enabled="true"/>
        <httpProtocol>
          <customHeaders>
            <add name="Access-Control-Allow-Origin" value="*" />
            <add name="Access-Control-Allow-Methods" value="POST, GET, OPTIONS" />
            <add name="Access-Control-Allow-Headers" value="accept, x-requested-with,content-type" />
          </customHeaders>
        </httpProtocol>
      </system.webServer>
    
    </configuration>
    

    Wednesday, April 27, 2016 4:45 PM

All replies