WCF server component getting outdated user name

Posted by JoelFan on Stack Overflow See other posts from Stack Overflow or by JoelFan
Published on 2010-06-09T18:13:32Z Indexed on 2010/06/09 21:12 UTC
Read the original article Hit count: 179

I am overriding System.IdentityModel.Policy.IAuthorizationPolicy.Evaluate as follows:

public bool Evaluate(EvaluationContext evaluationContext,ref object state)
{
    var ids = (IList<IIdentity>)evaluationContext.Properties["Identities"];
    var userName = ids[0].Name;

    // look up "userName" in a database to check for app. permissions

}

Recently one of the users had her user name changed in Active Directory. She is able to login to her Windows box fine with her new user name, but when she tries to run the client side of our application, the server gets her old user name in the "userName" variable in the code above, which messes up our authentication (since her old user name is no longer in our database).

Another piece of info: This only happens when she connects to the server code on the Production server. We have the same server code running on a QA server, and it does not have this issue (the QA server code gets her correct (new) user name)

Any ideas what could be going on?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about wcf