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

Discussion in 'ASP .Net Security' started by JohnH., Mar 18, 2005.

  1. JohnH.

    JohnH. Guest

    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
     
    JohnH., Mar 18, 2005
    #1
    1. Advertising

  2. 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?


    "JohnH." <> wrote in message
    news:...
    > 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
    >
     
    Nicole Calinoiu, Mar 18, 2005
    #2
    1. Advertising

  3. JohnH.

    JohnH. Guest

    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
     
    JohnH., Mar 18, 2005
    #3
  4. 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


    "JohnH." <> wrote in message
    news:...
    > 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
    >
     
    Nicole Calinoiu, Mar 21, 2005
    #4
  5. JohnH.

    JohnH. Guest

    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
     
    JohnH., Mar 22, 2005
    #5
  6. JohnH.

    JohnH. Guest

    Nicole,

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

    John
     
    JohnH., Mar 22, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nalbayo
    Replies:
    2
    Views:
    5,512
    Bruce Barker
    Nov 11, 2005
  2. JimLad
    Replies:
    0
    Views:
    453
    JimLad
    Jan 16, 2009
  3. Guest

    User.Identity.Name returns nothing / NULL

    Guest, May 9, 2005, in forum: ASP .Net Security
    Replies:
    5
    Views:
    304
    Guest
    May 10, 2005
  4. Allister
    Replies:
    5
    Views:
    438
    Joe Kaplan \(MVP - ADSI\)
    Apr 4, 2006
  5. Antonio O''Neal

    user.identity.name returns old AD user name

    Antonio O''Neal, Oct 31, 2008, in forum: ASP .Net Security
    Replies:
    5
    Views:
    2,079
    Antonio O''Neal
    Nov 3, 2008
Loading...

Share This Page