windows login info

D

dave

Hi
I'm writing one asp page and developing application for intranet...
I just need to know when if anyone executes this scripts, i need to find out his windows login information (only username on which they are currently logged in)..
I tried below code but its giving me machine name instead of username..
<%
Dim X
set X = createobject("WSCRIPT.Network")
dim U
U=x.UserName
Response.write "Logged In User is: " & U
%>
Any help would be appreciated..
Thanx in advance...
 
R

Ray Costanzo [MVP]

That script is running under the context of the IUSR account, so what you
describe is expected. What you want to do is change your settings for the
page, directory, application, or site to use authentication so that visitors
to your site are authenticated.

http://www.aspfaq.com/show.asp?id=2046
I'd also post a link to a page on iisfaq.com, but I'm unable to load that
site at the moment. Search for "authentication methods" there though too
for more info.

Ray at home


Hi
I'm writing one asp page and developing application for intranet...
I just need to know when if anyone executes this scripts, i need to find out
his windows login information (only username on which they are currently
logged in)..
I tried below code but its giving me machine name instead of username..
<%
Dim X
set X = createobject("WSCRIPT.Network")
dim U
U=x.UserName
Response.write "Logged In User is: " & U
%>
Any help would be appreciated..
Thanx in advance...
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top