protected override void AddServerErrorHandlers(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { int errorHandlerCount = endpointDispatcher.ChannelDispatcher.ErrorHandlers.Count; base.AddServerErrorHandlers(endpoint, endpointDispatcher); IErrorHandler webHttpErrorHandler = endpointDispatcher.ChannelDispatcher.ErrorHandlers[errorHandlerCount]; endpointDispatcher.ChannelDispatcher.ErrorHandlers.RemoveAt(errorHandlerCount); ValidationAwareErrorHandler newHandler = new ValidationAwareErrorHandler(webHttpErrorHandler); endpointDispatcher.ChannelDispatcher.ErrorHandlers.Add(newHandler); }