4

If i have few WCF extension modules of same kind (like parameter inspector) can i be sure they're executed in the order i define them in the configuration file?

<system.serviceModel>
    <extensions>
        <behaviorExtensions>
            <add name="MyInspectorA" type="blabla" />
            <add name="MyInspectorB" type="blabla" />
        </behaviorExtensions>
    </extensions>
</system.serviceModel>

I need more guaranties than just my observations but can't find any confirmations on MSDN.

UserControl
  • 14,766
  • 20
  • 100
  • 187

1 Answers1

7

They'll be executed in the order they appear in the

<system.serviceModel> <behaviors> <[service|endpoint]Behaviors> <behavior> <behavior_1 /> <behavior_2 /> <behavior_n /> </behavior> </[service|endpoint]Behaviors> </behaviors> </system.serviceModel>

, not in the order listed in the behavior extensions.

And service behaviors are called before endpoint behaviors - the order among the behaviors is described in http://blogs.msdn.com/b/carlosfigueira/archive/2011/03/16/wcf-extensibility-behaviors.aspx.

Bernhard Kircher
  • 4,132
  • 3
  • 32
  • 38
carlosfigueira
  • 85,035
  • 14
  • 131
  • 171
  • hmmm that document does not really support your assertion. I have also read that amongst service behaviours there is no guarantee of order of execution. – Squibly Nov 19 '19 at 05:51