Hosting a Service in IIS
How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services over HTTP protocol, the Windows Activation Service (WAS) can support others such as TCP and named pipes, and self-hosting can support many protocols and includes several deployment options such as console or Windows Forms applications and Windows services. Selecting a hosting environment has nothing to do with service implementation, but everything to do with service deployment and overall system design.
This lab will show you how to host an existing service type as part of a web site hosted in IIS. In the process, I’ll also be illustrating other extended concepts such as:
The WCF Service web site template
Message-based activation
Additional metadata behavior settings
Exporting service descriptions
Consuming service description documents to generate client code
As always, after the lab I’ll describe some of these features in greater detail.
Lab: Creating an IIS Host and Browsing Metadata
For this lab, you will work with an existing solution that contains a completed service library and shell client application. Using Visual Studio templates, you’ll create a new IIS web site project that contains a service and modify it to host a preexisting service. To consume the service, you’ll generate a client proxy from static service documentation exported using SvcUtil.
Creating a WCF Service web site
The first thing to do is create a WCF-enabled web site using the WCF Service template, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access