private void BuildHandler()
        {
            var be   = _serviceDispatcher.Binding.CreateBindingElements();
            var mebe = be.Find <MessageEncodingBindingElement>();

            if (mebe == null)
            {
                throw new ArgumentException("Must provide a MessageEncodingBindingElement", nameof(_serviceDispatcher.Binding));
            }

            var tbe = be.Find <HttpTransportBindingElement>();

            if (tbe == null)
            {
                throw new ArgumentException("Must provide a HttpTransportBindingElement", nameof(_serviceDispatcher.Binding));
            }

            var httpSettings = new HttpTransportSettings();

            httpSettings.BufferManager             = BufferManager.CreateBufferManager(DefaultMaxBufferPoolSize, tbe.MaxBufferSize);
            httpSettings.OpenTimeout               = _serviceDispatcher.Binding.OpenTimeout;
            httpSettings.ReceiveTimeout            = _serviceDispatcher.Binding.ReceiveTimeout;
            httpSettings.SendTimeout               = _serviceDispatcher.Binding.SendTimeout;
            httpSettings.CloseTimeout              = _serviceDispatcher.Binding.CloseTimeout;
            httpSettings.MaxBufferSize             = tbe.MaxBufferSize;
            httpSettings.MaxReceivedMessageSize    = tbe.MaxReceivedMessageSize;
            httpSettings.MessageEncoderFactory     = mebe.CreateMessageEncoderFactory();
            httpSettings.ManualAddressing          = tbe.ManualAddressing;
            httpSettings.TransferMode              = tbe.TransferMode;
            httpSettings.KeepAliveEnabled          = tbe.KeepAliveEnabled;
            httpSettings.AnonymousUriPrefixMatcher = new HttpAnonymousUriPrefixMatcher();
            _httpSettings = httpSettings;
            var scope = _servicesScopeFactory.CreateScope();

            _replyChannel      = new AspNetCoreReplyChannel(_servicesScopeFactory.CreateScope().ServiceProvider);
            _channelDispatcher = _serviceDispatcher.CreateServiceChannelDispatcher(_replyChannel);
        }