castle wcf facility set serviceBehavior configuration name in code -


i have several services want register dynamically instead of having entry each in app.config, smiliar following example.

<service name="myservice.service" behaviorconfiguration="servicebehavior"> <endpoint name="tcpendpoint"        binding="nettcpbinding"        bindingconfiguration="nettcp"       address="net.tcp://localhost:4321/myservice"      contract="mycontract.icontract" /> </service> 

i know how can create endpoints dynamically, dont know how can define behaviorconfiguration on defaultservicemodel.

is there way reuse service behavior app.config?

one thing can add behaviors define endpoint, this:

wcfendpoint.boundto(new nettcpbinding("nettcp")).at(url).addextensions(new youbehavior())


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -