I have added a service behavior extension to the default service behavior for logging un-handled exceptions, which is working as expected.
<extensions>
<behaviorExtensions>
<add name="UnhandledExceptions"
type="MyApp.WebServices.Behaviours.Extensions.UnhandledExceptionExtention, MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
<behaviors>
<serviceBehaviors>
<behavior>
<UnhandledExceptions />
</behavior>
</serviceBehaviors>
</behaviors>
However, when I try to add a new service into the project I get the following error:
Failed to update the configuration file
The type 'MyApp.WebServices.Behaviours.Extensions.UnhandledExceptionExtention, MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' registired for extention 'UnhandledExceptions ' could not be loaded. Web.config line XX
To get around this; I comment out the extension usage in the service behavior, add the service and undo the config change.
Although this is a workable solution I would rather not have to depend upon myself and other developers remembering what appears to be an unnecessary process.
Is there a way this can be fixed?