Simple Self Hosted WCF Service in C#

Self Hosting : In this post we will explain about self host service using console application in windows application. This referred as self hosting WCF service, the exact meaning of Self Hosted is provides the user to host the service in any application that could be Console Application or Windows forms etc. Earlier we saw about What is WCF service on dot net platform. We can host WCF service in IIS and windows service also. Service can also be in-pro i.e. client and service in the same process. Now let's us create the WCF service which is hosted in Console application. We will also look in to creating proxy using 'Client Base' class. Step 1 : First let's start create the Service contract and it implementation. Create a console application and name it as WCF_NewsService. This is simple service which return News . Step 2 : Add the System.ServiceModel and System.runtime.serialization reference to the project. Step 3 : ...