Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to get the hostname or IP address of the server?

Answers were Sorted based on User's Feedback



How to get the hostname or IP address of the server?..

Answer / praveen

string IpAddress=HttpContext.Current.Request.UserHostName;

Is This Answer Correct ?    3 Yes 0 No

How to get the hostname or IP address of the server?..

Answer / soumya

Dim myHost As String = System.Net.Dns.GetHostName
Dim myIPs As System.Net.IPHostEntry =
System.Net.Dns.GetHostByName(myHost)
MessageBox.Show("The name of the host is = " &
myIPs.HostName, "Host Name", MessageBoxButtons.OK,
MessageBoxIcon.Information)

For Each myIP As System.Net.IPAddress In myIPs.AddressList

MessageBox.Show("The IP address of host is = " &
myIP.ToString, "Host IP Address", MessageBoxButtons.OK,
MessageBoxIcon.Information)

Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Difference between user groups and code groups

0 Answers  


What are data types in .NET?

0 Answers   UGC Corporation,


Where does the dispose method lie and how can it be used to clean up resources?

1 Answers   Wipro,


What's the problem with .net generics?

0 Answers  


What property do you have to set to tell the grid which page to go to when using the Pager object?

2 Answers   Siebel,


What is SOAP? How you will do windows and forms authentication?

0 Answers   Wipro,


What is Entity Relationship Model in .NET?

0 Answers   Viscus Infotech,


what is object lock?

1 Answers  


What are multicast delegates?

0 Answers  


Explain assemblies in .net?

0 Answers  


What is the difference between an abstract class and an interface?

0 Answers  


What is namespace in .net?

0 Answers  


Categories