WCF Custom BehaviorExtension Error: An extension "silverlightFaults" already appears in extension
collection. Extension names must be unique.
I have a custom behaviorExtension for a silverlight project which helps in communicating faultcontract
messages to client. This error occurs when the service is called. Works good in Dev and QA boxes but
not in PROD test server. Any ideas of where to start and how to debug ?
Platform: .NET 3.5, Silverlight, WCF, Win2003 x64
Any help is appreciated.
web.config section:
<extensions>
<behaviorExtensions>
<add name="silverlightFaults"
type="Mrr.Srsa.Services.SilverlightFaultBehavior, Mrr.Srsa.Services, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=9e9f5a95ab06f177"/>
</behaviorExtensions>
</extensions>
<behaviors>
<endpointBehaviors>
<behavior name="SilverlightFaultBehavior">
<silverlightFaults />
</behavior>
</endpointBehaviors>
</behaviors>
Well, the Exception pretty much says it all: somewhere higher up in the configuration hierarchy (web.config in a higher level directory / machine.config etc.) there is already an extension named silverlightFaults. Try to stick a <clear /> between <behaviorExtensions> and <add name="silverlightFault" ... />
--larsw