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

  • SEARCH
  • Home
  • 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 333677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:59:01+00:00 2026-05-12T09:59:01+00:00

I’ve created a custom binding and want to make it configurable over App.config. The

  • 0

I’ve created a custom binding and want to make it configurable over App.config.

The binding has no special options at the moment, so it would be sufficient to support just

<endpoint address="http://myAddress" 
          binding="myBinding"
          contract="myContract">

After checking some sites, I found out that I have to enable configuration support through a <BindingExtension>. However, the MSDN site didn’t help much, since when I try to add

<extensions>
  <bindingExtensions>
    <add name="myBinding" 
         type="MyNamespace.MyHttpBinding, NameOfMyDll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
  </bindingExtensions>
</extensions>

, I only receive the following error message when trying to launch the program:

Configuration binding extension ‘system.serviceModel/bindings/myBinding’ could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.

The type mentioned in the bindingExtension points to the type which inherits from Binding.

What do I have to add to enable configuration support for my binding?


My goal is just to be able to export my binding to the config file. I don’t want to allow any special settings for the binding. It should just be usable over the config file’s <endpoint> tag.

  • 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-12T09:59:01+00:00Added an answer on May 12, 2026 at 9:59 am

    You’re on the right track. The key point, however, is that the bindingExtension element should not point directly to your binding class itself.

    Instead, you need to have several class that support the configuration model.
    For starting, the bindingExtension you register is really a class that inherits from StandardBindingCollectionElement. This represents a collection of StandardBindingElement, which is the configuration class that has all the configuration properties that your binding will support in the .config file and would be responsible for creating your Binding instance and setting any properties on it that were set in the .config file.

    Also, notice that, normally, you’d follow a similar pattern for creating a configuration view of your TransportBindingElement (if you’re doing a transport channel) so that you can create custom bindings using it though configuration. In that case, you’d have a class inheriting TransportElement.

    P.S. If you’re thinking this is an awful lot of repetitive code if you’ve got lots of settings, then I agree.

    Update: Found what your problem was: You need at least an empty <bindings/> section in your config file. Just add it and the binding will be recognized now.

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

Sidebar

Related Questions

No related questions found

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.