i am using windows application with c#.net i want get the system ip address and store the database This is My code
using System.Text; using System.Windows.Forms; using System.Diagnostics; . . . string[] computer_name =System.Net.Dns.GetHostEntry(Process.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' }); txt_ipaddress.Text = strClientIP.ToString() + "[" + computer_name[0].ToString() + "]";
Come to My problem i got the error in 'System.Diagnostics.Process' does not contain a definition for 'ServerVariables' How to slove This ...
Which system's IP address do you want? 1) The current one? 2) Some remote one?