943,985 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 10513
  • ASP RSS
Mar 19th, 2007
0

how to get network login user name

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
anitha2324 is offline Offline
11 posts
since Mar 2007
Mar 26th, 2007
0

Re: how to get network login user name

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
Reputation Points: 12
Solved Threads: 8
Junior Poster
davidcairns is offline Offline
114 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Using two dropdown forms in an ASP page
Next Thread in ASP Forum Timeline: problem for a simple asp.net query





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC