Hosting the WCF service in ASP.NET Development Server
HelloWorldService
is a class library. It has to be hosted in an environment so that client applications may access it. In this section, we will explain how to host it using ASP.NET Development Server. Later, in the next chapter, we will discuss more hosting options for a WCF service.
Creating the host application
There are several built-in host applications for WCF services within Visual Studio 2010. However, in this section, we will manually create the host application so that you can have a better understanding of what a hosting application is really like under the hood. In subsequent chapters, we will explain and use the built-in hosting application.
To host the library using ASP.NET Development Server, we need to add a new website to the solution. Follow these steps to create this website:
In Solution Explorer, right-click on the Solution file and select Add | New Web Siteā¦ from the context menu. The Add New Web Site dialog window...