How to retrieve, in a Intranet, the name of the client computer that connects to IIS 6.0

Discussion in 'ASP .Net' started by DevX, Nov 22, 2007.

  1. DevX

    DevX Guest

    Hello,

    I have a big intranet that I run with IIS 6.0.

    I need to log the client's machine names, and I found on the web istruction
    on how to use REMOTE_HOST server variable while enabling Reverse DNS on IIS.

    Using also a query to the DNS retrieves only the names of machine that are
    registered in the DNS (like servers).

    Any idea (both server and client side)? Apparently it worked a time on a
    client, but actually I keep getting only the IP on the various machine I'm
    using.

    Thanks Alot

    DevX
    DevX, Nov 22, 2007
    #1
    1. Advertising

  2. Hello DevX,

    Just use the JavaScript code for this.
    Don't forget that u need to change security settings for intranet

    try
    {
    var ax = new ActiveXObject("WScript.Network");
    document.write('User: ' + ax.UserName + '<br />');
    document.write('Computer: ' + ax.ComputerName + '<br />');
    }
    catch (e)
    {
    document.write('Permission to access computer name is denied' + '<br />');
    }


    ---
    WBR,
    Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    D> Hello,
    D>
    D> I have a big intranet that I run with IIS 6.0.
    D>
    D> I need to log the client's machine names, and I found on the web
    D> istruction on how to use REMOTE_HOST server variable while enabling
    D> Reverse DNS on IIS.
    D>
    D> Using also a query to the DNS retrieves only the names of machine
    D> that are registered in the DNS (like servers).
    D>
    D> Any idea (both server and client side)? Apparently it worked a time
    D> on a client, but actually I keep getting only the IP on the various
    D> machine I'm using.
    D>
    D> Thanks Alot
    D>
    D> DevX
    D>
    Michael Nemtsev [MVP], Nov 23, 2007
    #2
    1. Advertising

  3. "Michael Nemtsev [MVP]" <> wrote in message
    news:...

    > Don't forget that u need to change security settings for intranet


    And be using IE...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Nov 23, 2007
    #3
  4. DevX

    Steve Guest

    IIS returns the IP address by default to increase performance. If you want
    to set your site or server to do reverse lookups to get the actual hostname,
    you'll have to modify your IIS settings. See
    http://support.microsoft.com/kb/245574 for details on how to do this.

    In your case, the reverse lookup seems to be failing, as is the NetBIOS call
    that is executed afterwards. The IIS server returns the IP address as a last
    resort.

    There is no server-sided script to fix this. You need to look at your
    Intranet and server settings to determine why both DNS reverse lookup and
    NetBIOS are failing.

    HTH

    Steve

    "DevX" <> wrote in message
    news:%...
    > Hello,
    >
    > I have a big intranet that I run with IIS 6.0.
    >
    > I need to log the client's machine names, and I found on the web
    > istruction on how to use REMOTE_HOST server variable while enabling
    > Reverse DNS on IIS.
    >
    > Using also a query to the DNS retrieves only the names of machine that are
    > registered in the DNS (like servers).
    >
    > Any idea (both server and client side)? Apparently it worked a time on a
    > client, but actually I keep getting only the IP on the various machine I'm
    > using.
    >
    > Thanks Alot
    >
    > DevX
    >
    >
    >
    >
    >
    >
    >
    >
    Steve, Nov 23, 2007
    #4
  5. DevX

    DevX Guest

    Thank to both of you. Luckily we have standardized machines all running IE6.

    "Mark Rae [MVP]" <> ha scritto nel messaggio
    news:...
    > "Michael Nemtsev [MVP]" <> wrote in message
    > news:...
    >
    >> Don't forget that u need to change security settings for intranet

    >
    > And be using IE...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    DevX, Nov 23, 2007
    #5
  6. DevX

    DevX Guest

    I have already done the Reverse DNS configuration. Just while I am writing
    this, a colleague reports that on his client the server-side stuff works. On
    many other clients it did not. (For client I am referring to standard Active
    Directory pc connected, not server with a DNS entry).

    Can you provide me some link to explore better why the Reverse DNS is
    failing? I want to know more about this, NetBIOS et al.

    In any case, Many thanks for you time

    DevX

    "Steve" <> ha scritto nel messaggio
    news:...
    > IIS returns the IP address by default to increase performance. If you want
    > to set your site or server to do reverse lookups to get the actual
    > hostname, you'll have to modify your IIS settings. See
    > http://support.microsoft.com/kb/245574 for details on how to do this.
    >
    > In your case, the reverse lookup seems to be failing, as is the NetBIOS
    > call that is executed afterwards. The IIS server returns the IP address as
    > a last resort.
    >
    > There is no server-sided script to fix this. You need to look at your
    > Intranet and server settings to determine why both DNS reverse lookup and
    > NetBIOS are failing.
    >
    > HTH
    >
    > Steve
    >
    > "DevX" <> wrote in message
    > news:%...
    >> Hello,
    >>
    >> I have a big intranet that I run with IIS 6.0.
    >>
    >> I need to log the client's machine names, and I found on the web
    >> istruction on how to use REMOTE_HOST server variable while enabling
    >> Reverse DNS on IIS.
    >>
    >> Using also a query to the DNS retrieves only the names of machine that
    >> are registered in the DNS (like servers).
    >>
    >> Any idea (both server and client side)? Apparently it worked a time on a
    >> client, but actually I keep getting only the IP on the various machine
    >> I'm using.
    >>
    >> Thanks Alot
    >>
    >> DevX
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
    >
    DevX, Nov 23, 2007
    #6
  7. DevX

    Steve Guest

    DevX,

    I'm not a Windows expert, but imagine that there is some sort of interaction
    between Windows DNS and DHCP for the clients that isn't configured
    correctly. I would need to know which clients you are running, which
    browser, which DHCP, and which DNS.

    As I understand it, when a DHCP lease is issued to a client, the DHCP server
    updates the DNS server dynamically. So the reverse lookup should work. But
    some of the clients or the DHCP server may be configured so that DNS is not
    updated. Does this make sense?

    Cheers,

    Steve

    "DevX" <> wrote in message
    news:...
    >I have already done the Reverse DNS configuration. Just while I am writing
    >this, a colleague reports that on his client the server-side stuff works.
    >On many other clients it did not. (For client I am referring to standard
    >Active Directory pc connected, not server with a DNS entry).
    >
    > Can you provide me some link to explore better why the Reverse DNS is
    > failing? I want to know more about this, NetBIOS et al.
    >
    > In any case, Many thanks for you time
    >
    > DevX
    >
    > "Steve" <> ha scritto nel messaggio
    > news:...
    >> IIS returns the IP address by default to increase performance. If you
    >> want to set your site or server to do reverse lookups to get the actual
    >> hostname, you'll have to modify your IIS settings. See
    >> http://support.microsoft.com/kb/245574 for details on how to do this.
    >>
    >> In your case, the reverse lookup seems to be failing, as is the NetBIOS
    >> call that is executed afterwards. The IIS server returns the IP address
    >> as a last resort.
    >>
    >> There is no server-sided script to fix this. You need to look at your
    >> Intranet and server settings to determine why both DNS reverse lookup and
    >> NetBIOS are failing.
    >>
    >> HTH
    >>
    >> Steve
    >>
    >> "DevX" <> wrote in message
    >> news:%...
    >>> Hello,
    >>>
    >>> I have a big intranet that I run with IIS 6.0.
    >>>
    >>> I need to log the client's machine names, and I found on the web
    >>> istruction on how to use REMOTE_HOST server variable while enabling
    >>> Reverse DNS on IIS.
    >>>
    >>> Using also a query to the DNS retrieves only the names of machine that
    >>> are registered in the DNS (like servers).
    >>>
    >>> Any idea (both server and client side)? Apparently it worked a time on a
    >>> client, but actually I keep getting only the IP on the various machine
    >>> I'm using.
    >>>
    >>> Thanks Alot
    >>>
    >>> DevX
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>

    >>
    >>

    >
    >
    Steve, Nov 23, 2007
    #7
  8. DevX

    DevX Guest

    Thanks,

    I think I must work closely to the sys admins of the customer to know better
    how the intanet is configured.
    For know I know that they use mainly Win 2000 client but the server
    architecture is very intricated and I don't know it very well.

    I will investigate about the relation between DNS, DHCP and client
    configuration.

    Bye
    DevX


    "Steve" <> ha scritto nel messaggio
    news:...
    > DevX,
    >
    > I'm not a Windows expert, but imagine that there is some sort of
    > interaction between Windows DNS and DHCP for the clients that isn't
    > configured correctly. I would need to know which clients you are running,
    > which browser, which DHCP, and which DNS.
    >
    > As I understand it, when a DHCP lease is issued to a client, the DHCP
    > server updates the DNS server dynamically. So the reverse lookup should
    > work. But some of the clients or the DHCP server may be configured so that
    > DNS is not updated. Does this make sense?
    >
    > Cheers,
    >
    > Steve
    >
    > "DevX" <> wrote in message
    > news:...
    >>I have already done the Reverse DNS configuration. Just while I am writing
    >>this, a colleague reports that on his client the server-side stuff works.
    >>On many other clients it did not. (For client I am referring to standard
    >>Active Directory pc connected, not server with a DNS entry).
    >>
    >> Can you provide me some link to explore better why the Reverse DNS is
    >> failing? I want to know more about this, NetBIOS et al.
    >>
    >> In any case, Many thanks for you time
    >>
    >> DevX
    >>
    >> "Steve" <> ha scritto nel messaggio
    >> news:...
    >>> IIS returns the IP address by default to increase performance. If you
    >>> want to set your site or server to do reverse lookups to get the actual
    >>> hostname, you'll have to modify your IIS settings. See
    >>> http://support.microsoft.com/kb/245574 for details on how to do this.
    >>>
    >>> In your case, the reverse lookup seems to be failing, as is the NetBIOS
    >>> call that is executed afterwards. The IIS server returns the IP address
    >>> as a last resort.
    >>>
    >>> There is no server-sided script to fix this. You need to look at your
    >>> Intranet and server settings to determine why both DNS reverse lookup
    >>> and NetBIOS are failing.
    >>>
    >>> HTH
    >>>
    >>> Steve
    >>>
    >>> "DevX" <> wrote in message
    >>> news:%...
    >>>> Hello,
    >>>>
    >>>> I have a big intranet that I run with IIS 6.0.
    >>>>
    >>>> I need to log the client's machine names, and I found on the web
    >>>> istruction on how to use REMOTE_HOST server variable while enabling
    >>>> Reverse DNS on IIS.
    >>>>
    >>>> Using also a query to the DNS retrieves only the names of machine that
    >>>> are registered in the DNS (like servers).
    >>>>
    >>>> Any idea (both server and client side)? Apparently it worked a time on
    >>>> a client, but actually I keep getting only the IP on the various
    >>>> machine I'm using.
    >>>>
    >>>> Thanks Alot
    >>>>
    >>>> DevX
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    DevX, Nov 26, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matrix
    Replies:
    0
    Views:
    864
    Matrix
    Jan 18, 2005
  2. LamSoft

    ASPX VB.NET Connects to WMI

    LamSoft, Jun 4, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    706
    Mark Rae
    Jun 4, 2007
  3. Ramon
    Replies:
    21
    Views:
    846
    Nigel Wade
    Feb 23, 2009
  4. Eric Templin
    Replies:
    3
    Views:
    360
    Joe Kaplan \(MVP - ADSI\)
    Aug 2, 2005
  5. Replies:
    6
    Views:
    155
Loading...

Share This Page