Example #1
0
        public void Start()
        {
            try
            {
                if (!_initialized)
                {
                    throw new Exception("HOST not initialized");
                }

                // + security: SPN registration
                if (ConfigurationSettings <CSHostSettings> .Current.IsSecurityEnabled)
                {
                    SSPIUtility.RegisterSpn(true);
                    if (!SSPIUtility.IsSPNRegistered)
                    {
                        AppUtil.LogEvent("DB Service: SPN is not registered. Only local connections will be served.", EventLogEntryType.Information);
                    }
                }
                // - security

                _managementServer.Start();
                if (LoggerManager.Instance.ServerLogger != null && LoggerManager.Instance.ServerLogger.IsInfoEnabled)
                {
                    LoggerManager.Instance.ServerLogger.Info("ManagementHost.Start()", "Management Host started.");
                }
            }
            catch (Exception ex)
            {
                if (LoggerManager.Instance.ServerLogger != null && LoggerManager.Instance.ServerLogger.IsErrorEnabled)
                {
                    LoggerManager.Instance.ServerLogger.Error("ManagementHost.Start()", "Error:", ex);
                }
                throw;
            }
        }
Example #2
0
        protected override void OnStart(string[] args)
        {
            allRecords = recordMan.LoadRecords();
            allRecords.Add(CreateMyRecord());
            mdns.ResolverDatabase.Clear();
            foreach (var rec in allRecords)
            {
                mdns.ResolverDatabase.Add(rec.Record.Domain, rec.Record);
            }

            mdns.Start();
            manager.Start();
        }