LOGON_USER returns blank for some users, works fin

Results 1 to 4 of 4

Thread: LOGON_USER returns blank for some users, works fin

  1. #1
    Greg N. Guest

    Default LOGON_USER returns blank for some users, works fin

    I&#039ve read several articles and messages about this topic, but none seemed to answer the exact problem I&#039m having.<BR><BR>First, here&#039s the code I&#039m using:<BR><BR>&#060;%<BR>If Request.ServerVariables("LOGON_USER") = "" Then<BR> Response.Status = "401 Unauthorized"<BR> Response.End<BR>End If<BR><BR>Logon = Request.ServerVariables("LOGON_USER")<BR>%&#062;<B R>&#060;html&#062;<BR>&#060;body&#062;<BR>Here&#03 9s the Login: &#060;%= Logon%&#062;<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR>This is the problem - for the large majority of the users on the network this works fine. It detects their NT Login and returns it (actually, in the application it uses it to access the database). But for a few users, LOGON_USER returns a blank value, and returns a blank page because of the response.end. Everyone is using IE4 and is accessing it the same way. Is this a problem with the server configuration, and if so, why does it affect only a very small number of users?

  2. #2
    jason miller Guest

    Default RE: LOGON_USER returns blank for some users, works

    I read on MSDN a few months ago that it had to do with some network tech eating the passively sent user tokens. To force a proper user token [works once, but holds user context for session], use basic authentication. I also augment this with cookies (as it&#039s easier to check for cookies than to check context) to ensure I&#039m serving valid information. The downside is, of course, your password gets sent all over the place in clear text (unless you do some encryption or SSL that I don&#039t have implemented here).

  3. #3
    Join Date
    Dec 1969

    Default RE: LOGON_USER returns blank for some users, works

    Is this behavior sporadic or specific to certain users in certain locations? If it&#039s always the same user, check these conditions:<BR><BR>1) What happens if someone else logs in from the same machine?<BR>2) What happens if the user logs in from someone else&#039s machine?<BR>3) What happens when you log in as the user?<BR><BR>It does sound like some network stuffies.

  4. #4
    Greg N. Guest

    Default RE: LOGON_USER blank for some, works for others

    Thanks for your reply. Good suggestion. I gave it a try under my NT login on one of the user&#039s workstations and it worked fine for me. When our user tried her login on my workstation, it still didn&#039t work for her. There seems to be something in her NT network profile that is keeping us from detecting this variable. <BR><BR>In addition, we have users accessing the app from offices nationwide. We know of three users in three different offices (in three different states) who are trying to access the site and are failing to be detected (including the one here at our Corporate office). In addition, other users in each office have no problems. From looking at the IE settings of the user here, I don&#039t see any differences in her configuration than those who can access it...<BR><BR>Any ideas..?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts