This project has moved and is read-only. For the latest updates, please go here.

Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element

Jan 31, 2012 at 2:00 PM


I'm new to wcf testload and am having problems running it. 

I read in the usage doc that , wcftestload changes config at the runtime of the client and then reverts back the changes once done.

my problem is, i already have a config section. so when it gave this error, I checked the client ...exe.config. it puts the diagnostics tag above my config section becasue of which I get the error as in subject.


please help. i desperately need to get this tool up and running on my client.



Feb 1, 2012 at 1:57 AM

Hello Kavya,

If the wizard sets up your config file incorrectly then you can set up the config file manually, and collect the message log manually. You can then tell the wizard to use the previously collected message log, in which case it will not try to configure and run your client.

I would like to understand what error the wizard is making though. Can you post the relevant part of the config file, along with an extract from the badly configured file?



Feb 1, 2012 at 11:11 AM

Hi Rob,


See the below client's exe.config. it appends   <system.diagnostics> before <ConfigSection>. The config of the service is fine and is done manually. But how can i do below thing manually? as the wizard updates it when I click on Run giving my client's exe?

if i take off the <configSection> from my client app.config, it works fine. but I need to retain it.


<?xml version="1.0" encoding="utf-8"?><configuration>  <system.diagnostics>    <sources>      <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">        <listeners>          <add type="System.Diagnostics.DefaultTraceListener" name="Default">            <filter type="" />          </add>          <add name="ServiceModelMessageLoggingListener">            <filter type="" />          </add>        </listeners>      </source>    </sources>    <sharedListeners>      <add initializeData="C:\Users\KShivakumar\AppData\Local\Temp\tmpB8F5.tmp" type="System.Diagnostics.XmlWriterTraceListener, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">        <filter type="" />      </add>    </sharedListeners>  </system.diagnostics>  <configSections>    <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />  </configSections>  <cachingConfiguration defaultCacheManager="DMCacheManager">    <cacheManagers>      <add name="DMCacheManager" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="50000" numberToRemoveWhenScavenging="1000" backingStoreName="NullBackingStore" />    </cacheManagers>    <backingStores>      <add type="Microsoft.Practices.Enterpr


please help