Hosting a WCF Service in IIS / C#
Step 1: Create a new Visual Studio project Choose the WCF installed template and create a new WCF Service Application: Step 2: Create your web service code Update the IService1.cs and Service1.svc.cs classes that are automatically created. You can of course delete these and create your own but I am re-using here for the sake of brevity. For ease of demonstration I will create an extremely simple “Hello world!” example. IService1.cs [code language="csharp"] using System.ServiceModel; using System.ServiceModel.Web; namespace WcfService { [ServiceContract] public interface IService1 { [OperationContract] [WebGet(UriTemplate = "/HelloWorld/")] string HelloWorld(); } } [/code] Service1.svc.cs [code language="csharp"] namespace WcfService { public class Service1 : IService1 { public string HelloWorld() { return "Hello world!"; } } } [/code] Re-build the visu...