Windows Communication Foundation:
Windows Communication Foundation(WCF) takes many existing communication technologies, such as Web Services, Windows Remoting, Microsoft Message Queuing, and abstracts them into a single technology. In most cases, this simplifies the way you communicate with other applications. It also allows you to communicate with other applications without being coupled to a specific technology. In this we are going to create a simple WCF service and we are going to host that service inside SharePoint 2010 .
Create a WCF Service:
The following steps should be followed to create a WCF service using Visual Studio 2010.
I. Open Visual Studio 2010.
ii. Go to File => New => Project.
iii. Select WCF Service Application under installed template category WCF and name it as Wcf.
iv. Target the .Net Framework 3.5.
v. Click OK.
vi. In the Solution Explorer delete Service.svc and IService.cs files.
vii. Right click the Solution Explorer and add a New Item.
viii. Select WCF Service and name it as CustomService.svc.
ix. Replace ICustomerService.cs with the following code.
public interface ICustomService
x. Replace CustomerService.svc.cs with the following code.