Environment.MachineName.ToString to return client machine name

Posted on 2007-10-03
Last Modified: 2013-11-26
Environment.MachineName.ToString on my Intranet page returns the runat (iis) server name.  Would like to retrieve the client machine name instead.
Question by:HaroldGreen
    LVL 10

    Accepted Solution


    Give this a try:

    Dim host As System.Net.IPHostEntry
    host = System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST"))
    strComputerName = host.HostName

    Author Comment

    Yeah... Thats it.  Although it is "obsoleted" it works.  Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now