Get Current Windows User

S

Shahid Juma

Hi,

Is it possible to get the current user that is logged on to the computer? I
want to use this as the basis of my validation on the site instead of asking
them to login in again. I know it could be a security issue if they keep the
computer unattended.

Thanks for the help,
Shahid
 
R

Ray Costanzo [MVP]

If you turn off anonymous access in IIS, visitors will have to authenticate.
If you use integrated authentication in an intranet environment and your
users are using IE with default settings, IE will automatically pass the
login credentials to IIS without any user intervention. Yuu can then use
Request.ServerVariables("AUTH_USER") to get the username.

Ray at work
 
S

Shahid Juma

Thanks,

One more question. How do I get all the users on the domain?

Thanks,
Shahid
 
R

Ray Costanzo [MVP]

What do you mean? Just list all the usernames? Or all the users who have
sessions on your site?

Ray at work
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top