1.11M Members

how to get network login user name

 
0
 

am trying to create a web page to be used by my network users (inside my intranet)

I want to get the visitor's name of my page ( in another words to get the network login user name of the person who is visiting my web page)

i tried to use one of the following commands


Response.Write Server.HTMLEncode(Request.ServerVariables("AUTH_USER"))

Response.Write Server.HTMLEncode(Request.ServerVariables("LOGON_USER"))


it is working and now no error is appearing but am not getting any result , only blank page ,


i have read in this link that i have to disable the Anonymous Access


http://classicasp.aspfaq.com/general/how-do-i-get-my-visitors-login-name/username.html

in my IIS settings


when i disabled Anonymous Access settings i was able to get the network login username but this created another side problem where "hostdll.exe" has increased and the CPU usage reached to 100%


and if i enable Anonymous Access setting there will not be any problem regarding hostdll.exe but i will not be able to get the user name ,


by the way Windows Authentication is always enabled

am using windows 2000 server with iis 5
ram 512
p-4 3000mhz

Please help me to overcome this problem..

 
0
 

Bit of an odd one that, but here is one thing you can try.

1. Create one sub directory (call it secure or something)

2. Set just that directory to not use anonymous access

3. Add a file to this directory that sets Session("UserName") = Request.ServerVariables("LOGON_USER") and then returns the user to the referring page

4. On every page where the username is required check the session variable to see if it is populated with the user name.

5. If it is empty then send the user to the secure directory to collect the username.

6. Note that if a page recieves form input this will not work unless you add the username to the initial form and collect it that way.

I'm not certain this will fix your memory issue (or what's causing them in the first place), but it doen't take too long to implement on most setups

Regards

D

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article