Page.User.Identity.Name

  • Thread starter Thread starter luna
  • Start date Start date
L

luna

Where does this function get the name from ?
reason i ask is, a user wanted their name changing on the domain,
i fixe everything else (email,login etc etc) but this function still
displays the old name

cheers

mark
 
The .net uses the identity of the current login user. But It depends on the
kind of authentication you use. If you are using Windows based authentication
then it will use NT Domain user id, But in some cases your application is
also running under admin id, in this case you impersonate admin id to run
application. you may check ur web.config for it.
 
cheers,

weird, seems to be windows auth

<authentication mode="Windows" />
<identity impersonate="true" />


still shows the wrong name, might just be the active directory


mark
 
"Windows" means use the username IIS determines, so you must also configure
IIS. Probabaly what you need to do in IIS is disallow anonymous access.

The impersonate setting is unrelated to determining User.Identity.Name. It's
used for setting a thread token on the executing thread based upon IIS' user.
Chances are that you don't need or want that if you simply want to know who
the user is.

-Brock
http://staff.develop.com/ballen
 
anon access is disabled, integrated windows authenticion only
havent been back to check if its ok as the woman does my head in!
 

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

Back
Top