We have a WCF service that validates the user's credentials against the local windows accounts on the machine, however whenever a new user is created or a password is changed, users cannot login until I restart the entire machine.
What can I do to tell it to check the credentials against the current user settings, and to not use old ones?
using (var pContext = new PrincipalContext(ContextType.Machine))
{
if (pContext.ValidateCredentials(username, password))
{
using (var context = new LHREntities(Connections.GetConnectionString()))
{
// Do work
}
}
}
I am using .Net framework 4.0 and Windows Server 2003. If I run everything in Visual Studio on my machine, everything works fine and credentials are correctly checked against the current settings, however once I deploy this to IIS on our production machine, it appears to validate against cached credentials.