How to get machine name in asp.net c#
In this article, we learn how to get machine name or computer name in asp.net c# as you can also learn how to get How to Get Current Location (Country, State, and City) Name Using JavaScript in Asp.Net but here we use google API
Method 1:-
string MachineName1 = Environment.MachineName;
Method 2:-
string MachineName2 = System.Net.Dns.GetHostName();
Method 3:-
string MachineName3 = Request.ServerVariables["REMOTE_HOST"].ToString();
Method 4:-
string MachineName4 = System.Environment.GetEnvironmentVariable("COMPUTERNAME");
How to get machine name in asp.net c#
Reviewed by NEERAJ SRIVASTAVA
on
3:07:00 PM
Rating:
No comments: