Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 823997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:02:00+00:00 2026-05-15T03:02:00+00:00

I am attempting to insert a custom behavior into my service client, following the

  • 0

I am attempting to insert a custom behavior into my service client, following the example here.

I appear to be following all of the steps, but I am getting a ConfigurationErrorsException. Is there anyone more experienced than me who can spot what I’m doing wrong?

Here is the entire app.config file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <behaviors>
            <endpointBehaviors>
                <behavior name="ClientLoggingEndpointBehaviour">
                    <myLoggerExtension />
                </behavior>
            </endpointBehaviors>
        </behaviors>
        <extensions>
            <behaviorExtensions>
                <add name="myLoggerExtension"
                     type="ChatClient.ClientLoggingEndpointBehaviourExtension, ChatClient, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"/>
            </behaviorExtensions>
        </extensions>
        <bindings>
        </bindings>
        <client>
            <endpoint
                behaviorConfiguration="ClientLoggingEndpointBehaviour"
                name="ChatRoomClientEndpoint"
                address="http://localhost:8016/ChatRoom"
                binding="wsDualHttpBinding"
                contract="ChatRoomLib.IChatRoom"
                />
        </client>
    </system.serviceModel>
</configuration>

Here is the exception message:

An error occurred creating the
configuration section handler for
system.serviceModel/behaviors:
Extension element ‘myLoggerExtension’
cannot be added to this element.
Verify that the extension is
registered in the extension collection
at
system.serviceModel/extensions/behaviorExtensions.
Parameter name: element (C:\Documents
and Settings\Andrew Shepherd\My
Documents\Visual Studio
2008\Projects\WcfPractice\ChatClient\bin\Debug\ChatClient.vshost.exe.config
line 5)

I know that I’ve correctly written the reference to the ClientLoggingEndpointBehaviourExtensionobject, because through the debugger I can see it being instantiated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:02:00+00:00Added an answer on May 15, 2026 at 3:02 am

    It turns out that I didn’t get the assembly qualified name EXACTLY right.
    The assembly qualified name was correct enough for the .NET framework to load, but then the WCF framework performs a naive character-by-character comparison when matching the behavior configurations.

    To finally get the exact type name, I wrote code to create an instance of ClientLoggingEndpointBehaviourExtension object, and wrote the AssemblyQualifiedName property to a local variable, which I then copy-and-pasted from the debug window into the .config file.

    That I had to do all this is considered to be a bug in the WCF framework.
    (See this link)
    Apparently it’s fixed in .NET 4.0.

    Also see this article.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the following (incomplete) code, I am attempting to insert 10 strings into a
I am attempting to insert text from a database into a custom TextArea component,
Attempting to insert an escape character into a table results in a warning. For
I am attempting to insert a Canvas3D object inside a Swing JPanel, but the
I am attempting to insert a copy of a row from one table into
I am attempting to insert a mass of records into SQL Server 2005 from
Greetings, I'm having the following issue: When I attempt to execute several INSERT INTO
I am attempting to insert a new node into a sorted linked list of
I am attempting to insert about 30k rows of data into a database. The
I'm attempting to insert an array into a SQL Server database. 1/4 is copied

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.