HttpContext.Current.User returns old user id

Discussion in 'ASP .Net' started by Dwight Johnson, Feb 16, 2010.

  1. In my web app I get the logged in user's id using
    HttpContext.Current.User. I can then compare this to ActiveDirectory
    to authenticate, and off we go.

    However, recently a woman at my company got married, and wanted to
    change her login name to use her new married name. No problem. Except
    when she ran my web app. Whenever she did, and hit the code that got
    her user id from HttpContext.Current.User, it returned her old id,
    which no longer existed in AD (hence, she definitely was not logging
    in using her old id). The problem persisted for several days.

    One purported solution was found here ( http://support.microsoft.com/kb/946358
    ), but this did not fix it. Finally, someone did an IISRESET on the
    server, and that appears to have solved the problem.

    Any thoughts on what might have happened here?
     
    Dwight Johnson, Feb 16, 2010
    #1
    1. Advertisements

  2. I'm not sure because you didn't provide enough information on how the
    authentication work in your application. Usually changing cache
    behaviors via registry settings works (see: http://support.microsoft.com/kb/946358)
    Maybe it also cached somewhere in your application?
     
    Alexey Smirnov, Feb 28, 2010
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.