private void MainForm_Load(object sender, EventArgs e) { try { WCFService broadcastSvc = new WCFService(); m_Host = new System.ServiceModel.ServiceHost(broadcastSvc); m_Host.Open(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }