views:

71

answers:

0

I am trying to use the MS Message Inspector sample from WCF Message Inspector

I converted the project to VS2010 and added a WCF application with a svc class. However, when I try to add a service reference, I am getting the following error:

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

I suspect the issue to be related to config files. I would appreciate any help. Here is the web.config from WCF application:

 <?xml version="1.0"?>
<configuration>
    <system.diagnostics>
        <sources>
            <source name="System.ServiceModel" switchValue="Warning,ActivityTracing" propagateActivity="true">
                <listeners>
                    <add type="System.Diagnostics.DefaultTraceListener" name="Default">
                        <filter type=""/>
                    </add>
                    <add name="ServiceModelTraceListener">
                        <filter type=""/>
                    </add>
                </listeners>
            </source>
        </sources>
        <sharedListeners>
            <add initializeData="c:\logs\web_tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
                <filter type=""/>
            </add>
        </sharedListeners>
    </system.diagnostics>
    <system.serviceModel>
        <services>
            <service name="Microsoft.ServiceModel.Samples.HelloService" behaviorConfiguration="HelloServiceBehavior">
                <!-- ICalculator is exposed at the base address provided by host: http://localhost/servicemodelsamples/service.svc  -->
                <endpoint address="" binding="wsHttpBinding" contract="Microsoft.ServiceModel.Samples.IHelloService" behaviorConfiguration="HelloServiceEndpointBehavior"/>
                <endpoint address="novalidation" binding="wsHttpBinding" contract="Microsoft.ServiceModel.Samples.IHelloService"/>
                <!-- the mex endpoint is exposed at http://localhost/servicemodelsamples/service.svc/mex -->
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                <host>
                    <baseAddresses>
                        <add baseAddress="http://localhost:22222/InspectorService"/&gt;
                    </baseAddresses>
                </host>
            </service>
        </services>
        <serviceHostingEnvironment>
            <baseAddressPrefixFilters>
                <add prefix="http://localhost" />
            </baseAddressPrefixFilters>
        </serviceHostingEnvironment>
        <!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
        <behaviors>
            <serviceBehaviors>
                <behavior name="HelloServiceBehavior">
                    <serviceMetadata httpGetEnabled="True"/>
                    <serviceDebug includeExceptionDetailInFaults="True"/>
                </behavior>
            </serviceBehaviors>
            <endpointBehaviors>
                <behavior name="HelloServiceEndpointBehavior">
                    <schemaValidator validateRequest="True" validateReply="True">
                        <schemas>
                            <add location="messages.xsd"/>
                        </schemas>
                    </schemaValidator>
                </behavior>
            </endpointBehaviors>
        </behaviors>
        <extensions>
            <behaviorExtensions>
                <add name="schemaValidator" type="Microsoft.ServiceModel.Samples.SchemaValidationBehaviorExtensionElement, MessageInspectors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
            </behaviorExtensions>
        </extensions>
    </system.serviceModel>
    <system.web>
        <compilation defaultLanguage="C#" debug="true"/>
    </system.web>
</configuration>