Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Looking up client machine name

Reply
Thread Tools

Looking up client machine name

 
 
Chris Fellows
Guest
Posts: n/a
 
      07-06-2010
Can someone tell me how to look up the machine name of the client's browser
in Classic ASP? I want to do it without having to install any third party
DLLs. I can get the client's IP address but I don't know which object to use
to do a DNS lookup.

 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      07-06-2010
Chris Fellows wrote on 06 jul 2010 in
microsoft.public.inetserver.asp.general:

> Can someone tell me how to look up the machine name of the client's
> browser in Classic ASP? I want to do it without having to install any
> third party DLLs. I can get the client's IP address but I don't know
> which object to use to do a DNS lookup.


Not available, as that would be a breach of security.

Google is your friend:

http://blogs.msdn.com/b/ericlippert/...to-obtain-the-
name-of-the-client-from-the-asp-server.aspx

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      07-06-2010

"Chris Fellows" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Can someone tell me how to look up the machine name of the client's
> browser in Classic ASP? I want to do it without having to install any
> third party DLLs. I can get the client's IP address but I don't know which
> object to use to do a DNS lookup.


You can't even get this when the user is authenticated to the site using
NTLM, so no there is no way to get it without a DLL installed in the
*browser*.

You might be able to do a reverse DNS lookup to get the public FQDN of the
connecting IP, but that is very rarely the machine name of the browser. You
would need to install a 3rd party DLL on the *server* for this though, there
is no standard object that provides this functionality. You might be able to
code something up using the ServerXMLHTTP object passing the IP address to
web server on another system that does the lookup for you, but it's not
something I'd recommend, especially as it will significantly slow down your
scripts while the lookup is being done.

Why do you need this information? If it's for some sort of additional
authentication step, have you considered looking into client side
certificates for per-machine proof of "identity"?

--
Dan

 
Reply With Quote
 
Chris Fellows
Guest
Posts: n/a
 
      07-06-2010
Sorry, forgot to mention that it is a company Intranet. I know that there are third party COM DLLs but I don't want to install anything additional on IIS.



Evertjan. wrote:

Chris Fellows wrote on 06 jul 2010 inmicrosoft.public.inetserver.asp.
06-Jul-10

Chris Fellows wrote on 06 jul 2010 i
microsoft.public.inetserver.asp.general

Not available, as that would be a breach of security

Google is your friend

http://blogs.msdn.com/b/ericlippert/...-to-obtain-the
name-of-the-client-from-the-asp-server.asp

-
Evertjan
The Netherlands
(Please change the x'es to dots in my emailaddress)

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
BizTalk Orchestration And Web Services.
http://www.eggheadcafe.com/tutorials...-services.aspx
 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      07-06-2010
In that case it's going to be very messy. Why do you need the machine names?
If the users are authenticated against IIS (using NTLM for instance) then
you can get the DOMAIN\USER from the HTTP variables easily enough, but the
machine name is not included. If you have ADS then it may be possible to use
reverse DNS to lookup the machine name (assuming your ADS DNS is accessible
from IIS), but it's going to be really hard without installing an
off-the-shelf component such as ASPDNS that can handle all the hard work for
you.

For instance, something like this might work:
http://www.asp101.com/articles/jason...ns/default.asp

However, it may not if the permissions for IIS are locked down, as the
script relies on access to the command interpreter and to write a file (the
example uses a file in the root of drive C, you could use any location that
is writeable). It's the access to the command interpreter that will likely
be the most awkward to organise.



Dan


"Chris Fellows" wrote in message
news:(E-Mail Removed)...
> Sorry, forgot to mention that it is a company Intranet. I know that there
> are third party COM DLLs but I don't want to install anything additional
> on IIS.
>
>
>
> Evertjan. wrote:
>
> Chris Fellows wrote on 06 jul 2010 inmicrosoft.public.inetserver.asp.
> 06-Jul-10
>
> Chris Fellows wrote on 06 jul 2010 in
> microsoft.public.inetserver.asp.general:
>
>
> Not available, as that would be a breach of security.
>
> Google is your friend:
>
> http://blogs.msdn.com/b/ericlippert/...to-obtain-the-
> name-of-the-client-from-the-asp-server.aspx
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
>
> Previous Posts In This Thread:
>
>
> Submitted via EggHeadCafe - Software Developer Portal of Choice
> BizTalk Orchestration And Web Services.
> http://www.eggheadcafe.com/tutorials...-services.aspx




 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      07-06-2010
Dan wrote on 06 jul 2010 in microsoft.public.inetserver.asp.general:
> "Chris Fellows" wrote in message
> news:(E-Mail Removed)...
>> Sorry, forgot to mention that it is a company Intranet. I know that
>> there are third party COM DLLs but I don't want to install anything
>> additional on IIS.


> In that case it's going to be very messy. Why do you need the machine
> names? If the users are authenticated against IIS (using NTLM for
> instance) then you can get the DOMAIN\USER from the HTTP variables
> easily enough, but the machine name is not included. If you have ADS
> then it may be possible to use reverse DNS to lookup the machine name
> (assuming your ADS DNS is accessible from IIS), but it's going to be
> really hard without installing an off-the-shelf component such as
> ASPDNS that can handle all the hard work for you.
>
> For instance, something like this might work:
> http://www.asp101.com/articles/jason...ns/default.asp
>
> However, it may not if the permissions for IIS are locked down, as the
> script relies on access to the command interpreter and to write a file
> (the example uses a file in the root of drive C, you could use any
> location that is writeable). It's the access to the command
> interpreter that will likely be the most awkward to organise.


Wow!

Why not simply use a macine specific cookie,
that is set on each machine
using a system management password protected asp page?



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      07-07-2010

"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns9DADA8CD08928eejj99@194.109.133.242...
> Dan wrote on 06 jul 2010 in microsoft.public.inetserver.asp.general:
>> "Chris Fellows" wrote in message
>> news:(E-Mail Removed)...
>>> Sorry, forgot to mention that it is a company Intranet. I know that
>>> there are third party COM DLLs but I don't want to install anything
>>> additional on IIS.

>
>> In that case it's going to be very messy. Why do you need the machine
>> names? If the users are authenticated against IIS (using NTLM for
>> instance) then you can get the DOMAIN\USER from the HTTP variables
>> easily enough, but the machine name is not included. If you have ADS
>> then it may be possible to use reverse DNS to lookup the machine name
>> (assuming your ADS DNS is accessible from IIS), but it's going to be
>> really hard without installing an off-the-shelf component such as
>> ASPDNS that can handle all the hard work for you.
>>
>> For instance, something like this might work:
>> http://www.asp101.com/articles/jason...ns/default.asp
>>
>> However, it may not if the permissions for IIS are locked down, as the
>> script relies on access to the command interpreter and to write a file
>> (the example uses a file in the root of drive C, you could use any
>> location that is writeable). It's the access to the command
>> interpreter that will likely be the most awkward to organise.

>
> Wow!
>
> Why not simply use a macine specific cookie,
> that is set on each machine
> using a system management password protected asp page?
>


And what happens when the cookie isn't transmitted? For instance, using the
Inprivate mode in IE8?

--
Dan

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      07-07-2010
Dan wrote on 07 jul 2010 in microsoft.public.inetserver.asp.general:

> And what happens when the cookie isn't transmitted? For instance,
> using the Inprivate mode in IE8?



In all theoretical probability, using the in private mode will not divulge
the machine name, even if it were possible to do this in a "normal"
situation.

Likewise using another browser or after cleaning the cookie caSHE.

Remember the OP specified an intranet situation.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      07-08-2010

"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns9DAEA60183A3Deejj99@194.109.133.242...
> Dan wrote on 07 jul 2010 in microsoft.public.inetserver.asp.general:
>
>> And what happens when the cookie isn't transmitted? For instance,
>> using the Inprivate mode in IE8?

>
>
> In all theoretical probability, using the in private mode will not divulge
> the machine name, even if it were possible to do this in a "normal"
> situation.


It won't ever do it, whether it's Inprivate or not.

> Likewise using another browser or after cleaning the cookie caSHE.
>
> Remember the OP specified an intranet situation.


I know, and I already replied showing an example using DNS that can get the
machine name from the internal DNS - in an intranet on a Windows domain,
assuming it's a Windows 2000 or higher domain controller using dynamic DNS,
all internal machines will have their machine name recorded in the ADS DNS
and so will be easy enough to look up, and responses will be quick, assuming
that IIS is given sufficient permission to do so.

--
Dan

 
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
Client Machine Name or Host name ? Anil G Java 4 01-31-2008 04:10 PM
Using DNS name verses Machine Name causes 403 error Jason ASP .Net Web Services 5 09-18-2006 07:49 AM
How to collect the UserID, Client Machine Name, IP address info? Kam ASP General 3 08-05-2005 12:40 PM
can i use vpn on a xp pro client(only client) broadband enabled machine leopard MCSE 1 12-08-2004 04:08 AM



Advertisments