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
Post a Comment