Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to Retrieve User Name and Machine Name using ASP?

Posted on 2001-07-25
7
Medium Priority
?
253 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
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.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

618 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