Develop WCF service using NetTcpBinding

by Jagadish Pulakhandam on 5/10/2011 12:24:00 PM
Rated 0 from 0 votes
Brief: Demonstrates the development of a WCF Service Library (with NetTcpBinding) from the scratch.
Posted to: Windows Communication Foundation - Bindings
Add to DiggAdd to del.icio.usAdd to FURLAdd to RedditAdd to YahooAdd to BlinklistAdd to GoogleAdd to ma.gnoliaAdd to ShadowsAdd to Technorati

Demonstrates the following (see attached video):

  • Create a very basic WCF Service Library from the scratch (using Visual Studio 2010)
  • Configure WCF Service (with NetTcpBinding) using "WCF Service Configuration Editor"
  • Execute by hosting through "WCF Service Host"
  • Test the service using "WCF Test Client"
Source code is provided in previous article.  Configuration needs to be changed as shown below:

01.<?xml version="1.0" encoding="utf-8" ?>
02.<configuration>
03. 
04.  <system.web>
05.    <compilation debug="true" />
06.  </system.web>
07.   
08.  <system.serviceModel>
09.    <behaviors>
10.      <serviceBehaviors>
11.        <behavior name="SampleCalcSvcBehavior">
12.          <serviceDebug includeExceptionDetailInFaults="true" />
13.          <serviceMetadata />
14.        </behavior>
15.      </serviceBehaviors>
16.    </behaviors>
17.    <services>
18.      <service behaviorConfiguration="SampleCalcSvcBehavior" name="SampleCalcSvc.CalcService">
19.        <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
20.          name="SampleCalcSvcNetTcpEndPoint" contract="SampleCalcSvc.ICalcService" />
21.        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
22.          name="SampleCalcSvcMexTcpEndPoint" contract="IMetadataExchange" />
23.        <host>
24.          <baseAddresses>
25.            <add baseAddress="net.tcp://localhost:8080/SampleSvc" />
26.          </baseAddresses>
27.        </host>
28.      </service>
29.    </services>
30.  </system.serviceModel>
31.</configuration>


Join the .NET Code Central Community and join the discussion!
Signing-up is FREE and quick. Do it now, we want to hear your opinion
0

Rated 0 from 0 votes ( login  to rate)
DotnetKicks DotnetKicksDe DotNetShoutout

Attachments / Source Code
You need to Login or Join for FREE to download the following

Video/Screen Recording (may not have audio narration/annotations)
You need to Login or Join for FREE to download the following