L'initialiseur de type pour 'Système.ServiceModel.Diagnostics.TraceUtility'

J'ai eu cette erreur en essayant de consommer un service WCF à partir d'un C#/.NET application de console:

L'initialiseur de type pour le Système.ServiceModel.Diagnostics.TraceUtility a déclenché une exception.

InnerException:

{"Configuration system failed to initialize"}
 {"Unrecognized configuration section system.serviceModel/serviceBehaviors.
  (C:\\Users\\...\\Documents\\Visual Studio 2013\\Projects\\Test.Console\\
   Test.Console\\bin\\Debug\\Test.Console.vshost.exe.Config line 7)"}

WebConfig:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <connectionStrings>
    <add name="ServiceConnString" 
         providerName="System.Data.SqlClient" 
         connectionString="Server=.;Database=TestDB;Trusted_Connection=True;"/>
  </connectionStrings>
  <system.serviceModel>
    <serviceBehaviors>
      <behavior name="debug">
        <serviceDebug includeExceptionDetailInFaults="true" />
      </behavior>
    </serviceBehaviors>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding" closeTimeout="00:01:00" 
                 openTimeout="00:01:00" receiveTimeout="00:10:00" 
                 sendTimeout="00:01:00" allowCookies="false" 
                 bypassProxyOnLocal="false" 
                 hostNameComparisonMode="StrongWildcard" 
                 maxBufferSize="20000000" maxBufferPoolSize="524288" 
                 maxReceivedMessageSize="20000000" messageEncoding="Text" 
                 textEncoding="utf-8" transferMode="Buffered" 
                 useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                        maxArrayLength="16384" maxBytesPerRead="4096"
                        maxNameTableCharCount="16384"/>
          <security mode="None">
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:26576/PersonInfoService.svc" 
                contract="PersonInfoService.IPersonInfoService" 
                binding="basicHttpBinding" name="BasicHttpBinding"/>
    </client>
  </system.serviceModel>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
</configuration>
Avez-vous inspecté l'exception et de vérifier l'exception interne? Il fournit beaucoup plus d'informations.
J'ai mis à jour mon post

OriginalL'auteur R R | 2013-11-21