ASP.net getting NT user name returns administrator?

Posted by JonH on Stack Overflow See other posts from Stack Overflow or by JonH
Published on 2010-04-27T12:39:36Z Indexed on 2010/04/27 12:43 UTC
Read the original article Hit count: 435

Filed under:

This doesnt seem to be an issue with windows XP. But I have an end user (my boss!!!) using windows 7 64 bit... In one of our apps we are grabbing the end user user name via:

    HttpContext.Current.User.Identity.Name.ToString.Substring
(HttpContext.Current.User.Identity.Name.ToString.IndexOf("\") + 1).ToLower

For me it is returning the correct user name for instance "jhermiz".

When my boss tries getting into the app, it thinks he is Administrator???

Does anyone know of any alternative or why this might be happening? The reason this is an issue is because I use that user name to pull other information...

This is visual studio 2003.

© Stack Overflow or respective owner

Related posts about asp.net-2.0