Request.UserHostName returning IP addy

Last post 12-10-2008 10:52 AM by TATWORTH. 5 replies.

Sort Posts:

  • Request.UserHostName returning IP addy

    07-23-2004, 11:48 AM
    • Member
      125 point Member
    • mirirom
    • Member since 07-23-2004, 11:34 AM
    • Posts 25
    hi,

    not sure if this is really a security topic or not, but i'm hoping someone can offer some advice on the following. i'm trying to obtain machine/device names and for some reason, the statement

    Request.UserHostName is returing an IP address rather than the assigned device name.

    i've checked the ipconfig of conecting clients to verify that DNS names do exist - and they do.

    any thoughts? greatly appreciate any help. thx

    -m
    ..::mirirom::..
  • Re: Request.UserHostName returning IP addy

    07-24-2004, 12:24 AM
    • All-Star
      18,705 point All-Star
    • Atrax
    • Member since 06-18-2002, 6:59 PM
    • Sydney, NSW, Australia
    • Posts 3,733
    you checked by doing a reverse lookup from the server in question?
    RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadable

    Jason Brown - MVP, IIS
  • Re: Request.UserHostName returning IP addy

    08-09-2004, 11:13 AM
    • Member
      125 point Member
    • mirirom
    • Member since 07-23-2004, 11:34 AM
    • Posts 25
    hi Atrax, thx for the reply. i did just that, using nslookup on the domain controller and successfully returned the assigned machine name(s) in the network.

    really strange.
    ..::mirirom::..
  • Re: Request.UserHostName returning IP addy

    08-09-2004, 11:53 AM
    • Member
      125 point Member
    • mirirom
    • Member since 07-23-2004, 11:34 AM
    • Posts 25
    just found a fix for this, although i'm not sure why this is necessary to get it to work:

    System.Net.Dns.GetHostByAddress(Request.UserHostAddress).Hostname

    ..::mirirom::..
  • Re: Request.UserHostName returning IP addy

    12-07-2008, 11:12 PM
    • Member
      75 point Member
    • zipswich
    • Member since 01-03-2008, 8:09 PM
    • Posts 155

    I have also been wondering this for a few years.  Have you found out why that extra step is necessary to get the host name?

    Hong
  • Re: Request.UserHostName returning IP addy

    12-10-2008, 10:52 AM
    • All-Star
      62,314 point All-Star
    • TATWORTH
    • Member since 02-04-2003, 8:34 AM
    • England
    • Posts 12,147
    • TrustedFriends-MVPs

    Try this one for getting the host name - see  http://www.codeplex.com/IPAddressExtensions

     

     

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
Page 1 of 1 (6 items)