Extends the class to implement hosts that expose custom programming models.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Use the class to create hosts that provide a custom programming model. The Windows Communication Foundation (WCF) service programming model uses the ServiceHost class.
Special note for Managed C++ users deriving from this class:
Put your cleanup code in (On)(Begin)Close (and/or OnAbort), not in a destructor.
Avoid destructors; they cause the compiler to auto-generate IDisposable.
Avoid non-reference members; they can cause the compiler to auto-generate IDisposable.
Avoid finalizers; but if you include one, you should suppress the build warning and call SuppressFinalize(Object) and the finalizer itself from (On)(Begin)Close (and/or OnAbort) to emulate what would have been the auto-generated IDisposable behavior.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003