public void Start() { AppDomain.CurrentDomain.UnhandledException +=new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); try { _Log.InfoFormat("{0} certificate path", SettingManager.Default.CertificatePath); X509Certificate serverCert = X509Certificate.CreateFromCertFile(SettingManager.Default.CertificatePath); server = new SecureTcpServer(SettingManager.Default.ServerPort, serverCert, OnServerConnectionAvailable, null); _Log.Info("Server Start"); server.StartListening(); _CommandCollectorHost.Start(); Application.Default.Start(); } catch (Exception ex) { _Log.Error(ex); } }