?
Solved

How to Retrieve User Name and Machine Name using ASP?

Posted on 2001-07-25
7
Medium Priority
?
249 Views
Last Modified: 2011-09-20
I have a form to be filled by users who use Win 2000 Pro clients logged into NT domain and when submitted to be sent by email.

What I need to be included when a form is submitted to get:
1. Machine name or IP address.
2. User Name.

So, how to now the Machine name and user name of a client?
Thanks  
0
Comment
Question by:alsaeed_s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 6316795
Request.ServerVariables("REMOTE_ADDR")
Request.ServerVariables("LOGON_USER")

these two server variables are what you want

0
 

Author Comment

by:alsaeed_s
ID: 6316846
I tried them, but I get nothing!

Could you give a small example..

Thanks
0
 
LVL 10

Expert Comment

by:makerp
ID: 6316867
to use LOGON_USER the user must have logged on to your site using challenge response/basic, see IIS settings for that web site/virtual directory, if not there is no way to get their username.

try REMOTE_HOST insead of _ADDR


0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:alsaeed_s
ID: 6316980
I have many virtual directories.
Which one should I check..

Please notice that I don't have that much experience in IIS, so could you please be more detailed.

Thanks
0
 
LVL 10

Accepted Solution

by:
makerp earned 200 total points
ID: 6317004
you need to go to the virtual di in question (where the scripts are) then go to security and enable basic or challenge response
0
 

Expert Comment

by:cscheepers
ID: 6317175
Just something extra - to seperate the domain and username:

Logon = Request.ServerVariables("Logon_User")

Position = InStr(1, Logon, "\")
Length = Len(Logon)
Domain = Left(Logon, Position - 1)

Position = InStr(1, Logon, "\")
Length = Len(Logon)
Username = Right(Logon, Length - Position)

Hope you can use it.
0
 

Author Comment

by:alsaeed_s
ID: 6319222
Thanks all for help.

Alsaeed
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question