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).

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.

NOTE

Chapter 5 provides greater detail about hosting, the various options available, the overall mechanics, and the nuances associated with the various hosting options.

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 %windir%Microsoft.NETFrameworkv2.0.50727CONFIG.

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 http://www.dotnetjunkies.com/Tutorial/99DD7042-532D-4DB4-8625-1CD8BF422D64.dcik.


NOTE

All ASP.NET "resources" are mapped to types that implement the IHttpHandler interface as required by the ASP.NET hosting engine.

Within the httpHandler section of the machine's Web.config, the mapping appears as shown in Listing 4-1.

Example. *.svc Mapping for WCF Handler
<add
   path="*.svc"
   verb="*"
type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel,
   Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
   validate="false" />

The 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 (*.aspx, *.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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset