Steve, without code anticipating errors you can do this:

strUserName = UCase(Request.ServerVariables("SERVER_NAME")) & "\" &
Request.ServerVariables("AUTH_USER")

This works for intranet users on the network.  It doesn't always work if
they are accessing the network from elsewhere.

HTH

-----Original Message-----
From: Steve Henry [mailto:steve_isis@;btinternet.com] 
Sent: Tuesday, October 29, 2002 11:53 AM
To: ActiveServerPages
Subject: Is it possible to get a user's Windows login username via an
ASP page?


Here's the deal:
Developing an intranet, we've got a noticeboard section. Everyone that
posts a message needs to be identified. We don't want to simply provide
a drop-down of known users on the message posting page, as it's wide
open to mischievious users who want to post messages as someone else.

What we want to do is get the NT logon username, and associate that to
the posted message automatically.

We can get the IP address using the server variables, but that's pretty
meaningless.  Is there any crafty way to get the actual login from the
client?

Incidentally, we almost had it cracked with DOS - if anyone knows how to
populate a DOS environment variable with the contents of a one-line txt
file, we could do it without any mindbending ASP.

Anyone able to help?

---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED] To unsubscribe send a blank email to
%%email.unsub%%



---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to