This post will walk you through setting up and running a WCF service using NetTcp binding on Windows Process Activation Service (WAS). WAS is a new feature of IIS 7.0 and makes it possible to host WCF services beyond HTTP and without installing the whole of IIS components. If you are interacting with services within the same infrastructure, you might opt to use NetTcp over HTTP binding; net.tcp being faster since your soap message is not wrapped inside a HTTP request. In this example I have a Stockmarket application with a net.tcp endpoint and a http mex endpoint to expose the metadata. I will be hosting it under root "Default Web Site/StockMarket"
1. The first step is you configure your WCF service to have NetTcp binding. <system.serviceModel>
<services>
<service name="StockMarket.StockService" behaviorConfiguration="mexBehavior">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8000/StockMarket"/>
<add baseAddress="http://localhost/StockMarket"/>
</baseAddresses>
</host>
<endpoint address="" binding="netTcpBinding" contract="StockMarket.IStock"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>Read more: Geeks Bearing Gifts
QR:
1. The first step is you configure your WCF service to have NetTcp binding. <system.serviceModel>
<services>
<service name="StockMarket.StockService" behaviorConfiguration="mexBehavior">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8000/StockMarket"/>
<add baseAddress="http://localhost/StockMarket"/>
</baseAddresses>
</host>
<endpoint address="" binding="netTcpBinding" contract="StockMarket.IStock"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>Read more: Geeks Bearing Gifts
QR: