locked
WCF : Could not find a base address that matches scheme http for the endpoint with binding CustomBinding. Registered base address schemes are []. RRS feed

  • Question

  • Hi all,

    i am trying to use custom binding in my service to enable Gzip compression.

    This is my web.config looks like 

      
    <system.serviceModel>
        <services>
          <service behaviorConfiguration="StreamsBehaviour"
            name="Data.StreamedFileTransfer.StreamHandler">
    
            <endpoint address="" binding="customBinding" bindingConfiguration="BinaryCompressionBinding"
              contract="Data.StreamedFileTransfer.IDataUploader" name="NetTcpBinding_IDataUploader">
              <identity>
                <dns value="Server1.com" />
              </identity>
            </endpoint>
    
            <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
              contract="IMetadataExchange" />
    
             <host>
              <baseAddresses>
                <add baseAddress="net.tcp://Server1.com/FileTransferService" />
              </baseAddresses>
            </host> 
          </service>
        </services>
    
        <behaviors>
          <serviceBehaviors>
            <behavior name="StreamsBehaviour">
              <serviceMetadata httpGetEnabled="false" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    
        <bindings>
          
       <customBinding>
    	  <binding name="BinaryCompressionBinding"   receiveTimeout="10:30:00" sendTimeout="10:30:00" openTimeout="10:30:00"
                     closeTimeout="10:01:00" >          
              <binaryMessageEncoding compressionFormat="GZip">           
              </binaryMessageEncoding>
              <httpTransport maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"  keepAliveEnabled="true" maxBufferSize="2147483647" />
     
              
    
            </binding>
          </customBinding>
        </bindings>
      </system.serviceModel>

    But i am getting 

    Service cannot be started. System.InvalidOperationException: Could not find a base address that matches scheme http for the endpoint with binding CustomBinding. Registered base address schemes are []. at System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost) at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection) at System.ServiceModel.ServiceHost.ApplyConfiguration() at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) 

    Can any body point me where is wrong in the configuration.

    Thanks 


    Friday, June 29, 2018 4:19 AM