Test your technical skills online, appear in Virtual Interview and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Make friends on DotNetFunda.com and expand your network!
Winners

Win Prizes

Announcements
Like us on Facebook
Sponsor
Top Articles Author
Thu, 17-Apr-2014 Authors
All Time Authors
Sourav.Kayal
39750
SheoNarayan
34800
Niladri.biswas
33350

Latest members | More ...


(Statistics delayed by 5 minutes)
Ads

using netTcpBinding in WCF

Anup1252000
Posted by under WCF category on for Beginner level | Views : 43416 red flag
If you found plagiarised (copied) or inappropriate content,
please let us know the original source along with your correct email id (to communicate) for further action.
Rating: 5 out of 5
1 vote(s)

In this article we are going to use netTcpBinding in WCF.

Introduction
In this article, we are going to use netTcpBinding in WCF. 

Advantages of using Net.Tcp are as follows:
         1) It can be used for high performance communication.
         2) Net.Tcp Port sharing service enables net.tcp port to be shared across multiple user processes.


Lets go through this application step by step

Step1: 

         In this application, we are going to use Console Application. Open VS2008>New>Project>Console Application>Select language as c#>give the name of the project.


Step2:

       Give the Reference to System.ServiceModel. Now lets write our ServiceContract,OperationContract and so on.



It just prints the value whatever we enter.


Step3:

         Now lets configure the app.config. I suggest you to use WCF Service Configuration Editor Tool. If you dont know how to use it then go through this article http://msdn.microsoft.com/en-us/library/ms732009.aspx.
         
          


Step4:

        Now lets write the servicehost to our application.




Step5:

         Now we are using a tool called svcutil. 
        You need to type in VS command Prompt like this
        svcutil /out:proxy.cs /config:app.config "http://localhost:8025/Service"
        It will generate proxy.cs and app.config.


Step6:

        Now lets create a client application. New>Project>Console Application>give the name.
        Copy and paste the proxy.cs and app.config from the particular location and paste into client application.


Step7:

        Now give a Reference to System.ServiceModel. Then write these of lines in the Program.cs



Step8:

        Now lets run this application 



I hope you people like this application. Thank you.
Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:




About the Author

Anup1252000

Full Name: anup hosur
Member Level:
Member Status: Member
Member Since: 8/1/2009 2:37:23 AM
Country: India

Login to vote for this post.

Comments or Responses

Posted by: Gaur1982 on: 8/14/2013 | Points: 25

Want to know much more about NetTcpBinding in WCF...
Visit this link it has lots of information..
http://www.planetofcoders.com/nettcpbinding-in-wcf/


Login to post response.

Comments / Responses
Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
Bold Italic Underline Paragraph Title Code  Link 
 Wait ... Processing ..... please wait.

Comment using Facebook