Monday, June 11, 2012

Get Machine Name and IP ASP.NET

My previous post has an function which is now deprecated.

Following are the new function to get client machine name and IP address:

string[] computer_name = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.Split(new Char[] { '.' });
string machineName=computer_name[0].ToString();
string ipAddress  =Request.ServerVariables["REMOTE_ADDR"].ToString();

No comments:

Why do we use np.random.seed()

This is a simple function but to my surprise lot of ML engineers had asked me about the actual usage of this function and why do I use it wh...