WCF Services—Installing the .NET 3.0 Development Components
|Visual C# Tutorials|
|.NET Framework Tutorials|
|© 2007 Chris Peiris, Dennis Mulder|
Installing the .NET 3.0 Development Components
This section lists the general steps for installing the .NET 3.0 (WCF) development components. (Appendix C lists the detailed installation steps for the required components.) This is the required installation order:
- 1. Install Visual Studio 2005 or .NET 2.0 SDK.
- 2. Install the .NET Framework 3.0 RTC.
- 3. Install the Windows SDK.
- 4. Install the .NET Framework 3.0 Development Tools (if using Visual Studio).
Tip At the time of this writing, Visual Studio 2005 has known compatibility issues with Vista. The Visual Studio 2005 team is working on a service pack to be available in 2007 to address these issues. Also note that for ASP.NET debugging, it’s best to run Visual Studio 2005 from an elevated process.
WCF services can be hosted in any application process that loads the .NET 2.0 runtime, loads the appropriate .NET 3.0 Framework runtime components, and ultimately instantiates a
System.ServiceModel.ServiceHost instance that listens on an endpoint for requests.
This chapter focuses on getting up and running with WCF services and using the simplest of hosts—the ASP.NET development server and IIS. You can use IIS for both developing and deploying WCF services. Most of the mechanics of hosting WCF services inside ASP.NET are handled by an implementation of an
HttpHandler. This handler is
System.ServiceModel.Activation.HttpHandler and is mapped on a per-machine basis in the machine’s
Web.config file, which is located in the directory
|IIS, WCF, AND THE HTTP API|
| Windows 2003, Windows XP Service Pack 2, and Windows Vista all provide the HTTP API to allow applications that create HTTP listeners to gain a series of advantages over the traditional Winsock mechanism that has been available in current and prior releases of Windows.
WCF is positioned to take full advantage of this capability, which for the most part sat dormant on the client platform. Check out the article "Http.sys in WinXP SP2: What It Means with Windows Communication Foundation" located at
Note All ASP.NET "resources" are mapped to types that implement the
IHttpHandler interface as required by the ASP.NET hosting engine.
httpHandler section of the machine’s
Web.config, the mapping appears as shown in Listing 4-1.
Listing 4-1. *.svc Mapping for WCF Handler
<add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
System.ServiceModel.Activation.HttpHandler class is responsible for providing the
ServiceHost environment inside the ASP.NET worker process for applications that are hosted on IIS. This handler, just as handlers provide for other extensions (
*.asmx), is responsible for providing any runtime compilation of source code embedded inside the
*.svc files, in addition to providing update detection of the same source code as is done for the other handler types.