Monday, October 21, 2013

WCF Multiple endpoint configuration

<?xml version="1.0"?>
<configuration>

<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<protocolMapping>
<add scheme="net.tcp" binding="netTcpbinding"/>
</protocolMapping>
<bindings>
<wsHttpBinding>
<binding name="wsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
<netNamedPipeBinding>
<binding name="netNamedPipeBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None"></security>
</binding>
</netNamedPipeBinding>
<netTcpBinding>
<binding name="netTcpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None"></security>
</binding>
</netTcpBinding>
</bindings>
<services>

<service name="MVKWCFService.ProductService" behaviorConfiguration="DefaultServiceBehavior">

<host>
<baseAddresses>
<add baseAddress="net.tcp://vishnu/MYNetTcpHost/"/>
<add baseAddress="http://vishnu/MYNetTcpHost/"/>
</baseAddresses>
</host>

<endpoint address="ProductService.svc" binding="wsHttpBinding"
  bindingConfiguration="wsHttpBinding" contract="MVKWCFService.IProductService"
  name="wsHttpBinding_IAuthenticationService" />

<endpoint address="ProductService.svc" binding="netTcpBinding"
  bindingConfiguration="netTcpBinding" contract="MVKWCFService.IProductService"
  name="netTcpBinding_IAuthenticationService" />
<!-- Service Endpoints -->
<endpoint address="httpmex" binding="mexHttpBinding" contract="IMetadataExchange" />

<endpoint address="tcpmex"                                                                
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultServiceBehavior">

<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="false"/>

<!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<!--<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />-->
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

</configuration>

No comments:

Post a Comment