private void Init(string Url) { var intName = typeof(T).Name; var url2 = Url.Split('.'); var urlNew = string.Format("http://{0}:{1}/{2}", RedeUtil.GetHostName(), EnvironmentInformation.ServerPort, Url); if (Url.Contains(".soap")) { //"Servers.Math.MathController.soap" << vai chegar assim //retira o .soap se tiver Url = Url.Replace(".soap", "/"); Url += intName; Url += ".soap"; } else { //"Servers.Math.MathController" << vai chegar assim Url += "/"; Url += intName; Url += ".soap"; } ////"Servers.Math.MathController/IMath.soap" << vai sair assim _binding = new BasicHttpBinding(BasicHttpSecurityMode.None) { MaxBufferSize = int.MaxValue, MaxReceivedMessageSize = int.MaxValue }; _endpoint = new EndpointAddress(string.Format("http://{0}:{1}/{2}", RedeUtil.GetHostName(), EnvironmentInformation.ServerPort, Url)); _connectionInfo = new ConnectionInfo(); }
private void radioGroup1_SelectedIndexChanged(object sender, EventArgs e) { if (radioServerName.SelectedIndex == 1) { this.txtServerName.Text = RedeUtil.GetHostName(); } else if (radioServerName.SelectedIndex == 2) { this.txtServerName.Text = RedeUtil.GetLocalIPAddress(); } }