none
Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [https]

    Question

  • I am trying to host my WCF service on local IIS and I get this. I don't have SSL setup and I want it to work just with  http.

    URL I am trying to hit - http://localhost/WCF/BalanceService.svc/

    Relevant portions from web.config (I have commented the wsHttpBinding)

    <services>
          <service name="BalanceService"
    					 behaviorConfiguration="DefaultServiceBehavior">
            <!--<endpoint address=""
    						  binding="wsHttpBinding"
    						  bindingConfiguration="wsHttpBindingDefault"
    						  contract="IBalanceService"
    						  bindingNamespace="http://Services.Account" />-->
            <endpoint address="asmx"
    						  binding="basicHttpBinding"
    						  bindingConfiguration="basicHttpBindingDefault"
    						  contract="IBalanceService"
    						  bindingNamespace="http://Services.Account" />
            <endpoint address="mex"
    						  binding="mexHttpBinding"
    						  contract="IMetadataExchange"
    						  bindingNamespace="http://Services.Account" />
          </service>
        </services>
    <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBindingDefault" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" >
              <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="2147483647" />
              <security mode="None" />
            </binding>
          </basicHttpBinding>
        </bindings>
     <behavior name="DefaultServiceBehavior">
              <serviceMetadata httpGetEnabled="True" />
              <serviceDebug includeExceptionDetailInFaults="True" />
            </behavior>

    Please assist.

    Tuesday, August 21, 2012 8:39 PM

Answers

  • Just  wondering whether you have configurd you application directory with HTTP protocol supports. Sometimes ppl tends to delete that and get the above exception. I have the following config for a test calcservice and it all works fine.

      <system.serviceModel>
        <services>
          <service name="CalcService.Service1" behaviorConfiguration="DefaultServiceBehavior">
           <endpoint address=""
                      binding ="wsHttpBinding"
                      bindingConfiguration="wsHttpBindingDefault"
                      contract="CalcService.IService1"
                    />
           <endpoint address="/asmx"
                    binding="basicHttpBinding"
                    bindingConfiguration="basicHttpBindingDefault"
    						    contract="CalcService.IService1"
    						    />
           <endpoint address="mex"
    						  binding="mexHttpBinding"
    						  contract="IMetadataExchange"
    						  bindingNamespace="http://Services.Account" />
          </service>
        </services>
        <bindings>
          <wsHttpBinding>
            <binding name="wsHttpBindingDefault">
              <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="2147483647" />
              <security mode="None" />
            </binding>
          </wsHttpBinding>
          <basicHttpBinding>
            <binding name="basicHttpBindingDefault" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" >
              <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" maxDepth="2147483647" />
              <security mode="None" />
            </binding>
          </basicHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="DefaultServiceBehavior">
              <serviceMetadata httpGetEnabled="True" />
              <serviceDebug includeExceptionDetailInFaults="True" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>


    Tanvir Huda Application Architect/Consultant http://thetechnocrate.wordpress.com/

    Wednesday, August 22, 2012 12:04 AM