wcf use tradition configuration


in an concentration hosting several wcf services, best proceed supplement tradition settlement information any service? instance competence wish pass set association name mention connectionstring use parameter.



i'm guessing competence illusory implementing iservicebehavior.



i.e something like....



<behaviors>
<servicebehaviors>
<behavior name="mybehavior">
<servicemetadata httpgetenabled="true" />
<servicedebug />
<custombehavior mycompany="abc" />
</behavior>
<behavior name="myotherbehavior">
<servicemetadata httpgetenabled="true" />
<servicedebug />
<custombehavior mycompany="def" />
</behavior>
</servicebehaviors>
</behaviors>

<services>
<service behaviorconfiguration="mybehavior" name="mynamespace.myservice">
<endpoint address="" behaviorconfiguration="" binding="nettcpbinding"
name="tcpendpoint" contract="mynamespace.imyservice" />
<endpoint address="mex" binding="mextcpbinding" bindingconfiguration=""
name="tcpmexendpoint" contract="imetadataexchange" />
<host>
<baseaddresses>
<add baseaddress="net.tcp://localhost:4000/myservice" />
</baseaddresses>
</host>
</service>
<service behaviorconfiguration="myotherbehavior" name="mynamespace.myotherservice">
<endpoint address="" behaviorconfiguration="" binding="nettcpbinding"
name="tcpendpoint" contract="mynamespace.imyotherservice" />
<endpoint address="mex" binding="mextcpbinding" bindingconfiguration=""
name="tcpmexendpoint" contract="imetadataexchange" />
<host>
<baseaddresses>
<add baseaddress="net.tcp://localhost:4000/myotherservice" />
</baseaddresses>
</host>
</service>
</services>


would set abc myservice def myotherservice (assuming have common interface association name).



can anyone elaborate exercise this?



tia



michael



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members