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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -