ChannelDispatcher.ErrorHandlers Property
Gets a set of IErrorHandler objects that can be used to insert custom error handling functionality for an endpoint.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Property Value
Type: System.Collections.ObjectModel.Collection<IErrorHandler>A SynchronizedCollection<T> of IErrorHandler objects.
Uri baseAddress = new Uri("http://localhost:8001/Simple"); ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService), baseAddress); serviceHost.AddServiceEndpoint( typeof(ICalculator), new WSHttpBinding(), "CalculatorServiceObject"); serviceHost.Open(); ChannelDispatcher dispatcher = (ChannelDispatcher)serviceHost.ChannelDispatchers[0]; Collection<IErrorHandler> col = dispatcher.ErrorHandlers;
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.