c# - Mutiple http base address for self hosted WCF service? -
i have wcf service has 1 http endpoint, add http endpoint address different binding. service not hosted in iis , hence setting multiplesitebindingsenabled of no use.
am trying this.
<system.servicemodel> <servicehostingenvironment multiplesitebindingsenabled="true" /> <services> <service behaviorconfiguration="servicebehaviorconfiguration" name="serverservice"> <endpoint address="http://localhost:6732/serverservice" binding="webhttpbinding" behaviorconfiguration="webby" contract="iclientappcontract"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="http://localhost:800/serverservice" binding="basichttpbinding" contract="iclientappcontract"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" /> <host> <baseaddresses> <add baseaddress="http://localhost:800/serverservice" /> <add baseaddress="http://localhost:6732/serverservice" /> </baseaddresses> </host> </service> </services> </system.servicemodel>
try config shown below. exposes multiple endpoints through single port i'm sure pattern of configuration supported wcf.
<services> <service behaviorconfiguration="servicebehaviorconfiguration" name="serverservice"> <endpoint address="" binding="webhttpbinding" behaviorconfiguration="webby" contract="iclientappcontract"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="basic" binding="basichttpbinding" contract="iclientappcontract"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" /> <host> <baseaddresses> <add baseaddress="http://localhost:800/serverservice" /> </baseaddresses> </host> </service> </services>
Comments
Post a Comment