Change/Modify Service Behaviors at runtime


I have an Azure Service bus relay endpoint and I need to swap out the service behavior based on a deployment group. I'm invoking the service via the messages' "Addressing":"To" setting.

How can I access the service proxy and alter the behavior configuration or the "Behavior XML" value stored on the Service Behaviors node of the Connections explorer?


message.SetProperty("Addressing", "To", "http://sample.uri/resource");


<endpointBehaviors>
<behavior name="ServiceBusTokenProvider">
<transportClientEndpointBehavior>
<tokenProvider>
<sharedAccessSignature keyName="RootManageSharedAccessKey" key="MyAzureKey"/>
</tokenProvider>
</transportClientEndpointBehavior>
</behavior>
</endpointBehaviors>

  • up

    FabrizioM.

    Hi Jared,

    same issue here.

    How did you solve it?

    Thanks

    Fabrizio