Getting Network Login via ASP

A

Alex Wolff

Hi,

I need to know if its possible to create an ASP page that when requested
will display the network id of the requester.

Most people have told me to query the request.servervariables("LOGON_USER").

But this will get me the login of the server and not the client. In our
situation we do not want to have our users login twice (once to their machine
(the client) and then again to the server (the one that serves the asp page).
I need to know the client logon name.

Thanks.

Thanks.
 
M

Mark Schupp

If you set your site to not allow anonymous access and to allow windows
authentication then "logon_user" should return the client's network logon
id. I believe there are some security issues if the server is not in the
client's "local intranet zone" but the login to the server should be
transparent otherwise.
 
R

Ray Costanzo [MVP]

Turn off anonymous access and you'll be able to use AUTH_USER. If this is
an intranet and the person loads your page in IE, in default configuration,
in the intranet zone, the person will not be prompted to authenticate.

Ray at work
 
J

Jeff Cochran

I need to know if its possible to create an ASP page that when requested
will display the network id of the requester.

Most people have told me to query the request.servervariables("LOGON_USER").

But this will get me the login of the server and not the client. In our
situation we do not want to have our users login twice (once to their machine
(the client) and then again to the server (the one that serves the asp page).
I need to know the client logon name.

If they don't log into the domain the web server is in, you won't get
the correct account with this. If they log into the client, ASP can't
do much for you, since ASP is server side and the client has the
information. You'd need to run a client-side script to get the info.

Jeff
 
D

dave

Jeff Cochran said:
If they don't log into the domain the web server is in, you won't get
the correct account with this. If they log into the client, ASP can't
do much for you, since ASP is server side and the client has the
information. You'd need to run a client-side script to get the info.

Jeff

Hi I have succesfully used this to return the users login detail, but I now
have a new problem I have assigned the login to a Session Variable, however
when I come to use the string stored in the variable it excludes the \ which
seperates the domain from the user name, which really is a pain. Anybody
know why this is happening and how I can overcome it ?

Thanks
 
R

Ray Costanzo [MVP]

There's no reason that should happen. I suggest that you start a ~new~
thread about this and post the code you're using both to put the value into
the session variable as well as the code that you're using to pull it out
and display it.

Ray at home
 

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,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top