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

D

DevX

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
 
M

Michael Nemtsev [MVP]

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>
 
S

Steve

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
 
D

DevX

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
 
S

Steve

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
 
D

DevX

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top