HttpContext.Current.User.Identity.Name & ServerVariable("LOGON_USE

B

Barry

I have an Intranet application that uses the
System.Web.HttpContext.Current.User.Identity.Name to grab the DOMAIN\USERNAME
of the current user.

SCENARIO:
The user logs into their machine with their id/password and authenicates
against the domain. Fine. That works. However, when this user surfs to my
Intranet application the Current.User.Identity.Name returns a different
USERNAME than what was logged into the machine with.

While troubleshooting this issue, I found that when using the
SERVERVARIABLE("LOGON_USER") to get the DOMAIN\USERNAME, the correct USERNAME
is returned.

Does anybody have an idea as to why the two would produce different results?

Thanks in advance.
Barry
 
B

Barry

The user (Non-Admin) logs onto their machine with, as an example, ID TT1234.
However, the Current.User.Identity.Name returns TP1234.

If I use the ServerVariable("LOGON_USER") the correct ID, TT1234, is
returned.

This only happens for this one particular user.
 
P

Patrick.O.Ige

Have you tried using User.Identity.Name?
Are you in a Active Directory environment?
Patrick
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top