private void Login_Click(object sender, EventArgs e) { var serverClient = new ServerServiceClient(); String user = userTextBox.Text; String pass = passTextBox.Text; serverClient.ClientCredentials.UserName.UserName = user; serverClient.ClientCredentials.UserName.Password = pass; loginButton.Enabled = false; passTextBox.Text = ""; serverClient.Open(); launchMainForm(serverClient); try { } catch ( Exception exception ) { serverClient.Abort(); var info = new InfoForm(); info.Add(exception.Message); info.ShowDialog(this); } }
private void Login_Click(object sender, EventArgs e) { var serverClient = new ServerServiceClient(); String user = userTextBox.Text; String pass = passTextBox.Text; serverClient.ClientCredentials.UserName.UserName = user; serverClient.ClientCredentials.UserName.Password = pass; loginButton.Enabled = false; passTextBox.Text = ""; serverClient.Open(); launchMainForm(serverClient); try { } catch (Exception exception) { serverClient.Abort(); var info = new InfoForm(); info.Add(exception.Message); info.ShowDialog(this); } }
public WcfTestClient(IStatistics statistics, TestClientSettings settings) : base(statistics, settings) { _stopwatch.Start(); _service = new ServerServiceClient( new NetTcpBinding { Security = new NetTcpSecurity { Mode = SecurityMode.None, Transport = new TcpTransportSecurity { ProtectionLevel = ProtectionLevel.None }, Message = new MessageSecurityOverTcp { ClientCredentialType = MessageCredentialType.None } } // , TransferMode = TransferMode.Streamed }, new EndpointAddress("net.tcp://" + Settings.Host + ":" + Constants.WcfPort + "/ServerService/") ); _service.Open(); }