Intro To Windows Communication Foundation (WCF)

Hey there,

If you have been developing on ASP.NET 4, you might have an idea of using WCF in your website and if not, Windows Communication Foundation (WCF) is programming platform and runtime system for building and configuring your network-distributed services. In technical terms, it acts as middle layer between your database and your website. It also handles the communication and data between the two ends.

Requirements for creating your first WCF :
  • ASP.NET 4 Framework or Above
  • Visual Studio 2013 or Above
Optional Requirements: 
  • SQL Server 2012 or Above
  • Azure SDKs and Tools
    • Hosting your WCF on Azure
  • IIS 7.0
    • Configuring your WCF on IIS 7.0

 

Creating Your First WCF Project: 
  • Fire-up your Visual Studio 2013 or Above and Click on New Project
  • Locate WCF in the category and Select WCF Service Application
  • Name your project and Click Ok to create it
Intro01
Setup WCF Project
Quick look at your project:

 

Intro002
Quick look at WCF Project

 

 

After Visual Studio has initialize your project, you will be presented with these default classes above. Lets take a quick look at the classes that you will be using:

  • IService1.cs:
    • This class will display the methods created in the Service1.svc.cs to anyone website calling this service by using OperationContract.
    • You will be able to create DataContract (think of it as Model) to pass parameters in your methods.
  • Service1.svc:
    • This class is used to create methods or manipulate data in the WCF.
    • Consider it as the heart of the Service/WCF.
  • Web.Config:
    • All the settings of the project will be stored in this config class.

(Don’t worry if you came across some new terms or keywords, we’ll tackle each of them in the next post) 🙂

Good Luck for this new experience 😀

Kind Regards

Harshu K Gaonjur
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s