private bool TestConnection(IRemoteGetSet conection) { try { //test connection conection.IsFireKeyActiv(); return(true); } catch (Exception) { return(false); } }
private bool StartupServer() { try { // server muss zuvor gestartet werden // im bin/debug ordner manuell starten // !!!!! WICHTIG!!!! als Administrator ausführen!!!!!!!! // connect to the service with channelFactory ChannelFactory <IRemoteGetSet> cFactory; cFactory = new ChannelFactory <IRemoteGetSet>("WSHttpBinding_HWManager"); // endpoint m_remote = cFactory.CreateChannel(); return(TestConnection(m_remote));; } catch (Exception ex) { MessageBox.Show("Problem with startup \n" + ex.Message); return(false); } }