954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Get System Ip Adress

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 ...

Nithyamaha
Newbie Poster
5 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

Which system's IP address do you want?
1) The current one?
2) Some remote one?

thines01
Postaholic
Team Colleague
2,425 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
 

Post: Markdown Syntax: Formatting Help
You