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

  • Question

  •  <system.serviceModel>
          <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
              <baseAddressPrefixFilters>
                  <add prefix="https://localhost:2378/WCFService1/Service.svc"></add>
              </baseAddressPrefixFilters>
          </serviceHostingEnvironment>
          
        <services>

          <service name="Service" behaviorConfiguration="ServiceBehavior">
            <!-- Service Endpoints -->
            <endpoint address="https://localhost:2378/WCFService1/Service.svc" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="IService">
              <!--
                  Upon deployment, the following identity element should be removed or replaced to reflect the
                  identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity
                  automatically.
              -->
              <identity>
                <dns value="localhost"/>
              </identity>
            </endpoint>
            <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
          </service>
        </services>
          <bindings>
              <wsHttpBinding>
                  <binding name="TransportSecurity">
                      <security mode="Transport">
                          <transport clientCredentialType="Basic"/>
                      </security>
                  </binding>
              </wsHttpBinding>
          </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://localhost:2378/WCFService1/mex"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
    Friday, March 23, 2012 1:43 PM

Answers

  • Ensure you know the reason why you are using <baseAddressPrefixFilters>:

    http://msdn.microsoft.com/en-us/library/bb924481.aspx

    Paste this into your web.config to make your service work:

      <system.serviceModel>
        <services>
          <service name="Service" behaviorConfiguration="ServiceBehavior">
            <!-- Service Endpoints -->
            <endpoint address="" binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="IService">
              <identity>
                <dns value="localhost" />
              </identity>
            </endpoint>
          </service>
        </services>
        <bindings>
          <wsHttpBinding>
            <binding name="TransportSecurity">
              <security mode="Transport">
                <transport clientCredentialType="Basic" />
              </security>
            </binding>
          </wsHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehavior">
              <serviceMetadata httpsGetEnabled="true" httpsGetUrl="Service.svc/mex" />
              <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    Friday, March 23, 2012 2:15 PM