Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to retrieve, in a Intranet, the name of the client computer that connects to IIS 6.0

Reply
Thread Tools

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

 
 
DevX
Guest
Posts: n/a
 
      11-22-2007
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








 
Reply With Quote
 
 
 
 
Michael Nemtsev [MVP]
Guest
Posts: n/a
 
      11-23-2007
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>


 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      11-23-2007
"Michael Nemtsev [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) .com...

> 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

 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      11-23-2007
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>
>
>
>
>
>



 
Reply With Quote
 
DevX
Guest
Posts: n/a
 
      11-23-2007
Thank to both of you. Luckily we have standardized machines all running IE6.

"Mark Rae [MVP]" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> "Michael Nemtsev [MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) .com...
>
>> 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



 
Reply With Quote
 
DevX
Guest
Posts: n/a
 
      11-23-2007
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" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>
>>
>>
>>
>>
>>
>>

>
>



 
Reply With Quote
 
Steve
Guest
Posts: n/a
 
      11-23-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> ha scritto nel messaggio
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
DevX
Guest
Posts: n/a
 
      11-26-2007
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" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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" <(E-Mail Removed)> ha scritto nel messaggio
>> news:(E-Mail Removed)...
>>> 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" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
DirectoryEntry call to remote IIS Metabase ALWAYS connects as ASPNET Eric Templin ASP .Net Security 3 08-02-2005 03:06 PM
Cisco VPN Client 4.04 Rel to a PIX 506E connects, but no traffic GlenMorgan Cisco 13 02-22-2005 07:11 PM
Network Computer Reboots when Laptop Connects to Wireless Network Charles Law Wireless Networking 7 09-14-2004 02:11 PM



Advertisments