it seems not work as Error message pop up said "Automation Server Can't create object"
Main Topics
Browse All TopicsI had a web site running with ASP.
I want to know who visit my site. Instead of knowing their IP address, how can i get the client Computer name or User Name..
Eg. Tom surf my site through IE browser, and i would like to log down Tom' PC info like Computer name and User Name...
so what i expect to have once he click on my Page is: (for example)
Computer Name: Tom_PC
User Name: TOM
Many Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't think there is a way to get the username and computername without creating an ActiveX object (the ugly dialog box). Allowing the dialog box, you can retrieve the information this way:
Dim objNet
On Error Resume Next 'In case we fail to create object then display our custom error
Set objNet = CreateObject("WScript.NetW
If Err.Number <> 0 Then 'If error occured then display notice
MsgBox "Don't be Shy." & vbCRLF &_ "Do not press ""No"" If your browser warns you."
Document.Location = "UserInfo.html" 'Place the Name of the document.
'It will display again
End if
Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo
Set objNet = Nothing 'Destroy the Object to free the Memory
It depends on wether the user has logged on to the computer or not. If the user for example is on a win2k computer and has logged on it will show up. If the user has a win98 computer that automatically starts up without having to log on, the result will be empty.
What I know, for security reasons, there is no other way to get the user's computer name.
For obvious reasons some information is not send to the server. That includes:
the PC-name
the user's name
the user's email address
the user's home address
the user's telephone number
the user's age
the legal software installed on the machine
the ilegal software installed on the machine
etc.
If you want those, you'l have to ask the user. But remember: the user is allowed to lie.
You can request the Windows NT Login user with this code:
<% User = mid(LCase(Request.ServerVa
But you've tho disable the anonymos login in your IIS Filedirectory, and it work only on IExplorer as far as i know.
How to request the computer name ? i've no idea - sorry.
I hope i could help.
ieckhaa,
You can't, and if you could, you would have found a security hole and it would be fixed quickly.
For the information you want to have, you need permission from the user to get it. Either just ask it in a form, or ask permission to install some ActiveX or so on the client that will do the job.
Business Accounts
Answer for Membership
by: rsashiPosted on 2003-04-24 at 22:14:38ID: 8392925
Try this to get the computer name. However it gives a very ugly dialog box saying ActiveX control is used! work"); ame);
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
var wshNetwork = new ActiveXObject("WScript.Net
alert(wshNetwork.ComputerN
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>