CPT-Graphs-directed-weighted-ex1.svg

IIS 7.5 WCF Error: Could not find a base address that matches…

Error

I received the following error while trying to run a WCF application built in Visual Studio 2013 running on a Windows 8 IIS 7.5 server.

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

IIS Error

Solution

In this instance, my mex statement was wrong, I needed to make it mexHttpsBinding instead of mexHttpBinding. For other cases, double check that your bindings are correct. I was converting everything to HTTPS and had forgotten to change the mex binding to reflect the change.

<endpoint address="mex" binding="mexHttpsBinding" 
contract="IMetadataExchange" />
CPT-Graphs-directed-weighted-ex1.svg

IIS 7.5 WCF Error: The … does not have a Binding with the None MessageVersion.

Error

I received the following error while trying to run a WCF application built in Visual Studio 2013 running on a Windows 8 IIS 7.5 server.

The … does not have a Binding with the None MessageVersion. ‘System.ServiceModel.Description.WebHttpBehavior’ is only intended for use with WebHttpBinding or similar bindings.

Solution

With help from http://msdn.microsoft.com/en-us/library/hh556232(v=vs.110).aspx and http://stackoverflow.com/questions/7585363/why-does-my-wcf-service-give-the-message-does-not-have-a-binding-with-the-none, I edited my web.config file and added/changed it to include the bolded text. Basically, I was confusing SOAP and REST calls. The below is utilized for REST only, SOAP requires the basicHttpBindings.


<system.serviceModel>
<services>
<service name="XOM.REIT.CNC.ClusterNotificationCenter" behaviorConfiguration="DefaultBehavior">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="secureHttpBinding" contract="XOM.REIT.CNC.IClusterNotificationCenter" behaviorConfiguration="DefaultEndpointBehavior"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:30022/"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
      <webHttpBinding>
        <binding name="secureHttpBinding">
          <security mode="Transport">
            <transport clientCredentialType="None"/>
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultBehavior">
            <serviceMetadata httpsGetEnabled="true"/>
            <serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="DefaultEndpointBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>

CPT-Graphs-directed-weighted-ex1.svg

IIS 7.5 Detailed Error: HTTP Error 404.3 – Not Found

Error

I received the following error while trying to run a WCF application built in Visual Studio 2013 running on a Windows 8 IIS 7.5 server.

HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension 
configuration. If the page is a script, add a handler. 
If the file should be downloaded, add a MIME map.
 IIS 7.5 Error

Solution

My problem was that WCF wasn’t enabled in the IIS server. To fix this, I ran the following commands in an administrator command prompt.

C:\> DISM /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation
C:\> DISM /Online /Enable-Feature /FeatureName:WCF-HTTP-Activation45

Credit is due to http://stackoverflow.com/questions/11460142/cannot-serve-wcf-services-in-iis-on-windows-8.