Unable to get WCFExtras to work with WCF Service

May 21, 2012 at 6:58 PM

I am getting an error that I can't pull down the MetaData for the service.  When I look at the WCFExtras Sample, it all looks good and the sample works fine.  The only difference is that my WCF Service is .NET 4.0.

 

This is what my web.config looks like:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    
    <customErrors mode="Off" />

  </system.web>
  
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <directoryBrowse enabled="true" />
  </system.webServer>
  
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="CDITecServices.TECServiceHelperBehavior" name="CDITecServices.ITECServiceHelper">
        <endpoint address="" behaviorConfiguration="CDITecServices.TECServiceHelperEndpointBehavior" binding="basicHttpBinding" contract="CDITecServices.ITECServiceHelper"/>
      </service>
    </services>
    

    <behaviors>
      <endpointBehaviors>
        <behavior name="CDITecServices.TECServiceHelperEndpointBehavior">
          <wsdlExtensions singleFile="True"/>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="CDITecServices.TECServiceHelperBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <extensions>
      <behaviorExtensions>
        <!-- Declare that we have an extension called WSDL Extras-->
        <add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
      </behaviorExtensions>
    </extensions>

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/> 
  </system.serviceModel>


</configuration>

Below is my Interface:

namespace CDITecServices
{
    [XmlComments]
    [ServiceContract]
    public interface ITECServiceHelper
    {

        [OperationContract]
        void DownloadDataFile(string OrderTicketId, string Username, string Password, string UserDatabase);

        [OperationContract]
        List<string> GetRecordsFromFile(string OrderTicketId, ref long StartIndex);

        // TODO: Add your service operations here
    }
}