Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
respected sir/madam

i m having a problem related with active directory and its domain. i have written a code in asp.net using vb in which i getting the all users from the active directory but i m not able to find the logged user name of client computer which are
connected through my domain. sir actually this is possible in window script but i m not getting in .Net...if u have anything please reply me very soon..
thanks in advance........
Posted
Updated 8-Jan-12 21:32pm
v3

You won't be able to get this information without an active control. Browsers operate within a sandbox for security and are limited in what information can be obtained directly from a client machine
 
Share this answer
 
Comments
Ankur\m/ 9-Jan-12 4:10am    
Correct answer, my 5!
Supriya Srivastav 9-Jan-12 5:11am    
Absolutely right,my 5 too.
Hi frincy,

Have you tried using Request.Params["LOGON_USER"] ? It contains both domain name and logged in user name.

Hope it helps.
 
Share this answer
 
Comments
Ankur\m/ 9-Jan-12 4:09am    
That won't work. It will probably just work when you run it from your IDE. Deploy the application on IIS and then check.
See Mark's answer for the reason.
Amir Mahfoozi 9-Jan-12 4:23am    
Since he told : "i have written a code in asp.net using vb in which i getting the all users from the active directory ", It doesn't seem that he has a plan to deploy it to an outside web server so lets see what he will tell us about it.
VB
response.write(Server.MachineName)
 
Share this answer
 
Comments
Ankur\m/ 9-Jan-12 6:42am    
Wrong, that will return machine name of the "server" and not a client.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900