Home All Groups Group Topic Archive Search About

ConfigurationErrorsException when using dataContractSerializer

Author
4 Jan 2007 4:58 PM
Rob Ford
I'm experiencing several System.Configuration.ConfigurationErrorsException
exceptions when adding the dataContractSerializer to a behavior

<system.serviceModel>
  <behaviors>
    <endpointBehaviors>
      <behavior name="CalculatorBehavior">
        <dataContractSerializer maxItemsInObjectGraph="165536" />
      </behavior>
    </endpointBehaviors>
  </behaviors>
</system.serviceModel>


The error I get is "This element is not currently associated with any
context".

The exceptions are handled internally by WCF.  The errors don't stop the app
from running and using the service and once the entire config has been loaded
it seems the error condition disappears.

For each behavior defined with a dataContractSerializer we'll see 2
exceptions.  This is causing our application startup time to reach
unacceptable levels.

Posting to this forum as no reply received to a previous post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1025211&SiteID=1

many thanks

Rob

AddThis Social Bookmark Button