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

I am constantly writing the drawing procedures with system.drawing.graphics, but having to use the try and dispose blocks is too time-consuming with graphicsobjects. Can I automate this?

0 Answers  


What is meant by globalization?

0 Answers  


Describe the difference between inline and code behind which is best in a loosely coupled solution?

1 Answers  


What are the deferred execution and the immediate execution in linq?

0 Answers  


What is the use of edititem template ingridview?

1 Answers   C Squared Systems, Microsoft,


Will my .net app run on 64-bit windows?

0 Answers  


Explain the difference between garbage collections in .net 4.0 and earlier versions?

0 Answers  


Explain what are the deferred execution and the immediate execution in linq?

0 Answers  


What is a windows process in .net?

0 Answers  


Explain why do we use msmq?

0 Answers  


What is UDDI and how to register a web service ?

2 Answers   Msoft, TCS,


Write a program to create a user control with name and surname as data members and login as method and also the code to call it.

0 Answers  


Categories