grabbing the login name

M

Middletree

Intranet application.

strLogon= Replace(Request.ServerVariables("LOGON_USER"),"DOMAIN\","")


The above line is used by several pages on my browser-based app to obtain
the Windows login name for the user. Of course, I replaced our domain name
with the generic word "DOMAIN" here, but the point is that I am trying to
get that name and store it into a variable.

It works fine in Production, but not on my dev box, which is on the network
and is very similar to the Production server (Same OS, for example).

On my dev box, it doesn't return anything, but in Production, it will return
jsmith, mjones, etc.

It's not a showstopper, but a bit of an annoyance. Would you have any idea
why I'm not able to get the logon value on my one box but still get it on
the other, using the same code?
 
A

Anthony Jones

Middletree said:
Intranet application.

strLogon= Replace(Request.ServerVariables("LOGON_USER"),"DOMAIN\","")


The above line is used by several pages on my browser-based app to obtain
the Windows login name for the user. Of course, I replaced our domain name
with the generic word "DOMAIN" here, but the point is that I am trying to
get that name and store it into a variable.

It works fine in Production, but not on my dev box, which is on the network
and is very similar to the Production server (Same OS, for example).

On my dev box, it doesn't return anything, but in Production, it will return
jsmith, mjones, etc.

It's not a showstopper, but a bit of an annoyance. Would you have any idea
why I'm not able to get the logon value on my one box but still get it on
the other, using the same code?

Probably because your website on the dev box has anonymous access turned on.
Switch it off.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top