Get Client Machine name from web app



If you want to get the client PC name, you can use the following code block.

string computer_name;
string[] Host_Name = System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_HOST"]).HostName.Split(new Char[] { '.' });
computer_name = Host_Name [0].ToUpper();




Comments

Popular posts from this blog

Apply CSS styles to SharePoint Web parts

SharePoint Number Column Without Commas

Use of Information Rights Management (IRM) in SharePoint