What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 37023 |  Welcome, Guest!   Register  Login
  Home > Community Home >

Get Host Name

 Author: som.nitk | Posted on: 6/12/2008 1:55:25 AM | Views: 64

Recommend an Articles | Recommended Articles | Search Resources | Community Home |




I use this line of code to get the host name from a system:

 System.Net.IPHostEntry obj = new IPHostEntry();
obj = Dns.GetHostByName(Request.UserHostAddress);
String HostName = obj.HostName.ToString();

and this retrieves this Host Name: bea-som.corp.bea.org

 

However from my client application I call this:

 System.Net.Dns.GetHostName()

and this retrieves the host name as: bea-som

 

What changes do I make to either the C# client application or website so that both of them take the same host name ?
... Go to the complete details ...

Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 1:32:59 PM