To host WCF Service we are going to create console application. Just create a console application. Add below references in console application project,

using System.ServiceModel; using System.ServiceModel.Channels;

Add the project reference of WCF Service application project we created in previous step. Right click on console application project and select Add Reference then click on Project tab and browse to WCF Service application project we created in previous step.

After adding all required references and of WCF Service project, we are going to write a code to host the application.

Since our service is up and running this is time to consume the service. Create a console application project right click and add service reference. In address you need to provide the same address we configured in App.Config file of host console application project.

Note: You need to make sure host console application project is running else you will get error while adding service reference.

After successfully adding the service reference we can call the service in normal way