Config file issue to make you rip hair out

I spent about 2 hours staring at this lovely cryptic error:
Extension element ‘silverlightFaults’ cannot be added to this element.  Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions

I had it setup correctly, but why would the system not compile it?

This was the registration:

<add name="silverlightFaults"
type="Seekford.SilverlightFaultBehavior.SilverlightFaultBehavior,Seekford.SilverlightFaultBehavior, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7073c134a4dabf61" />

So? What is wrong with this picture? Nothing unless you are an unforgiving parse engine that exists to make life difficult.

I had to add a space. Yes, a space between the class and assembly name and BAM!, it worked.

<add name="silverlightFaults"
type="Seekford.SilverlightFaultBehavior.SilverlightFaultBehavior, Seekford.SilverlightFaultBehavior, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7073c134a4dabf61" />

What a pile of #$%!!

Anyway, remember your spacing.

Happy Coding!

0 Replies to “Config file issue to make you rip hair out”

  1. Hi,

    Thanks for your information. I have tried this method but still i got the same error and I have used .net 4.0. could you please guide me to resolve this issue. my app.config file setting as

    Thanks in advance.

  2. sasireka :
    Hi,
    Thanks for your information. I have tried this method but still i got the same error and I have used .net 4.0. could you please guide me to resolve this issue. my app.config file setting as

    Thanks in advance.

  3. My setting as

    type=”MessageInspectors.Extensions.ConsoleOutputBehaviorExtensionElement, MessageInspectors.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”

Leave a Reply

Your email address will not be published. Required fields are marked *