ASP.NET User.Identity.Name returns wrong value?

J

JohnH.

When I got Visual Studio setup and configured to remotely debug c#
ASP.NET applications on a development IIS server I apparently changed
something on one of my .config files.

(1) When I login into my workstation using my domain account and
connect to our development IIS server User.Identity.Name should return
my domain user account. Instead, User.Identity.Name returns the local
Administrator account on the development IIS server.

(2) When I login into my workstation using another user's domain
account and connect to our development IIS server User.Identity.Name
returns that user's domain account.

(3) When I login into my workstation using my domain account and
connect to our production IIS server User.Identity.Name properly
returns my domain user account.

Since, other users can login to my workstation and get the correct
response from the development server it seems to me the problem is
somewhere in my profile.

Anybody got any ideas? I've been struggling with this for days.

Thanks,
John
 
N

Nicole Calinoiu

What do you mean by "connect to our development IIS server"? Open a page
via IE? Start debugging a project via VStudio? Something else entirely?
 
J

JohnH.

Browse a page via IE, also run/debug the page via Visual Studio. Also,
when I log into other workstation w/ my domain account and browse web
pages on the development server User.Identity.Name returns my domain
account. It is only when I log into my personal workstation and browse
pages on the development server that User.Identity.Name return the
local admin account of the development server.

Thanks,
John
 
N

Nicole Calinoiu

John,

I'm guessing that when you "log into my personal workstation", you're using
a local account that has cached credentials for the web server. To verify
this, log in under that account, then launch the "User Accounts" control
panel applet. You want to reach the password management functionality,
which will be available in one of the following two ways:

1. If your account is not an admin, you will be asked to provide admin
credentials when launching the applet. Below the credentials text boxes,
there should be a link to "manage your passwords", which you should click
instead of providing admin credentials.

2. If your account is an admin, click the "Manage Passwords" button on the
advanced tab of the applet UI.

Once you've opened the password list, do you see an entry for your dev
server? If so, delete it (you can always recreate it later), then try to
browse to a secured page your dev server using IE.

HTH,
Nicole
 
J

JohnH.

Nicole,

That worked!!! Oh my God! I can not tell you how much I have
been struggling with that. It was driving me absolutely crazy. Thank
you so much for taking the time to respond to my question.

:cool:
John
 
J

JohnH.

Nicole,

Wow, that was it. Thank you for taking the time to respond to my
posting. This was really driving me nuts.

John
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top