Getting the user's machine name

S

Scott McNair

How would I go about extracting an end-user's machine name? I tried
finding the info in server variables but it wasn't there. Or would this be
a client-side solution instead? If it is, I apologize for posting to the
wrong group.

Regards,
Scott
 
A

Aaron [SQL Server MVP]

The server can't access this unless it is offered, via
Request.ServerVariables("REMOTE_HOST"). Anyway this will almost always be
the network name, not the actual machine name. I think you will have to
rely on a signed applet or ActiveX control, and yes, it would have to happen
on the client.

I thought I had a FAQ on this, but can't seem to locate it.
 
P

Patrice

More likely you'll have an IP address available in server variables and it's
hidden etc by firewalls and such...

Explaining the overall goal may lead to better suggestions...

Patrice
 
S

Scott McNair

More likely you'll have an IP address available in server variables
and it's hidden etc by firewalls and such...

Explaining the overall goal may lead to better suggestions...

I'm writing an administrative piece for an intranet app we have, that
allows an administrator to add new machines to our DB. If the admin is
running the app from the new machine, I was wanting to have the machine
name and IP auto-populated for him in the form, so he wouldn't have to hunt
down the info and enter it manually (also the person doing admin may not be
technically inclined).
 
A

Aaron [SQL Server MVP]

I don't think you'll be able to get the machine name information from ASP...
 
P

Patrice

Try http://component-dll.aspobjects.com/ASP_Components/network/dns/
For an Intranet you should read back something quite meaningfull.
We have done something similar (but was using ASP.NET using a class readily
available) to identiy the machine from which a problem is declared...

If this is to keep and uptodate listing of all stations it could be likely
done from a central location (kind of inventory). For example if all
machines are registered in your domain, it's likely you could get them all,
or at logon time etc...

Patrice

--
 
S

Scott McNair

I don't think you'll be able to get the machine name information from
ASP...

I'm starting to discover that myself, by digging thru websites related to
it. It appears the tentative solution is to have a client-side script that
calls a WSH object, which would pop up the "Some objects may be harmful"
warning, but since this is the intranet that may be okay.
 

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

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top