how to get network login user name

Reply

Join Date: Mar 2007
Posts: 11
Reputation: anitha2324 is an unknown quantity at this point 
Solved Threads: 0
anitha2324 anitha2324 is offline Offline
Newbie Poster

how to get network login user name

 
0
  #1
Mar 19th, 2007
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.../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..
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 114
Reputation: davidcairns is an unknown quantity at this point 
Solved Threads: 8
davidcairns davidcairns is offline Offline
Junior Poster

Re: how to get network login user name

 
0
  #2
Mar 26th, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum


Views: 7130 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC