/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model">MSSQLAuditor model</param>
        public WebServerManager(MsSqlAuditorModel model)
        {
            int    tryCount         = 10;
            bool   webServerStarted = false;
            Random rnd = new Random();

            this._model    = model;
            _webServerPort = Consts.DefaultWebServerPort;

            for (int i = 0; i < tryCount; i++)
            {
                try
                {
                    this._frontend = new WebServerFrontend(_webServerPort, ProcessRequest);

                    log.InfoFormat("Web-server started at port:'{0}'",
                                   _webServerPort
                                   );

                    webServerStarted = true;

                    break;
                }
                catch (Exception ex)
                {
                    log.ErrorFormat("Unable to start web-server at port:'{0}'.Error:'{1}'",
                                    _webServerPort,
                                    ex
                                    );
                }

                _webServerPort = 10000 + rnd.Next(50000);
            }

            if (!webServerStarted)
            {
                log.ErrorFormat(
                    "Unable to start web-server for '{0}' times",
                    tryCount
                    );
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="model">MSSQLAuditor model</param>
        public WebServerManager(MsSqlAuditorModel model)
        {
            int    tryCount         = 10;
            bool   webServerStarted = false;
            Random rnd              = new Random();

            this._model    = model;
            _webServerPort = Consts.DefaultWebServerPort;

            for (int i = 0; i < tryCount; i++)
            {
                try
                {
                    this._frontend = new WebServerFrontend(_webServerPort, ProcessRequest);

                    log.InfoFormat("Web-server started at port:'{0}'",
                        _webServerPort
                    );

                    webServerStarted = true;

                    break;
                }
                catch (Exception ex)
                {
                    log.ErrorFormat("Unable to start web-server at port:'{0}'.Error:'{1}'",
                        _webServerPort,
                        ex
                    );
                }

                _webServerPort = 10000 + rnd.Next(50000);
            }

            if (!webServerStarted)
            {
                log.ErrorFormat(
                    "Unable to start web-server for '{0}' times",
                    tryCount
                );
            }
        }