Unable to Access HTTPS Endpoint Behind AWS ELB with WebHttpBinding

31 Views Asked by At

I am encountering an issue while attempting to access an endpoint behind an AWS Elastic Load Balancer (ELB) using HTTPS. I am using Application load balancer and its pointing to windows server. The error message I'm receiving is: "Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]".

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
     <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <customErrors mode="Off" />
  </system.web>
  <system.serviceModel>
    
    <behaviors>  
      <serviceBehaviors>  
        <behavior name="NewBehaviour">  
          <serviceMetadata httpsGetEnabled="False" httpGetEnabled="True" />
          <serviceDebug includeExceptionDetailInFaults="False" />  
        </behavior>  
      </serviceBehaviors> 
      
      <endpointBehaviors>        
        <behavior name="webHttp">
          <webHttp />
 
        </behavior>
      </endpointBehaviors>
    </behaviors>  
      
    <bindings>
        <webHttpBinding>
            <binding name="BindingNew">
              <security mode="Transport">
                <transport clientCredentialType="None">                  
                </transport>
              </security>
            </binding>
        </webHttpBinding>
    </bindings> 
        
    <services>
      <service name="FFCService.FFCService" behaviorConfiguration="NewBehaviour">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="BindingNew" behaviorConfiguration="webHttp" contract="FFCService.IFFCService">                 
        </endpoint>
          <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />      
      </service>         
    </services>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />  
  </system.serviceModel>  
  <system.webServer>  
<httpProtocol>
<customHeaders>
                <remove name="X-Powered-By" />
        <add name="X-Content-Type-Options" value="nosniff" /> 
</customHeaders>
</httpProtocol>
<security>
<requestFiltering removeServerHeader="true" />
</security>
    <modules runAllManagedModulesForAllRequests="true" />
    <directoryBrowse enabled="false" />
  </system.webServer>
   

</configuration>
 

I believe this error is related to miss configuration of web.config but I am not sure how to resolve this.

0

There are 0 best solutions below