If a service operation has a fault contract defined for it, the fault definitions form part of the service metadata from which you can generate client-side artifacts. As an example, consider the following fault contract.
Many applications and components in the .NET Framework use exceptions to indicate error conditions. Exceptions are an in-process error-reporting mechanism that automatically propagate up the call chain until they hit a user interface or process boundary.
If you use a self-hosted WCF service, you must deploy both the hosting assembly and the WCF service library assemblies to your target computer.
Deploying your WCF service to a WAS hosting environment follows the same process as hosting your WCF service in IIS 7.0.
To host your WCF service by using WAS, select Windows Communication Foundation Non-Http Activation Components on the host computer by using the
WAS is another alternative hosting option to IIS and self-hosted applications. Hosting in WAS shares the following similarities with hosting in IIS:
IIS provides a robust hosting environment that you can use to host your WCF services, although IIS limits you to the HTTP protocol. You can create an IIS host project for your WCF service by using the WCF Service Application project template in Visual Studio 2008. No additional hosting code is required.
You can host your WCF service in a Windows service. One benefit of Windows services is that you can activate and start your WCF service as soon as the system starts. The service runs silently in the background.
To implement your own self-hosted service application, you must write code to do the following: