I have a client that uses a WCF proxy to call a service. Credentials and other functionality work fine normally, but if the user changes their domain password and I restart the app, then I am unable to call the service due to this error:
System.ServiceModel.Security.SecurityNegotiaionException
-> The server has rejected the client credentials.
System.Security.Authentication.InvalidCredentialException
-> The server has rejected the client credentials.
System.componentmodel.Win32Exception
-> The logon attempt failed.
Obviously I know that the user's credentials have changed but how can I refresh the CredentialCache
to reflect the new credentials so that the WCF call will succeed?
The service checks the token in the client context against the AD. The wcf client uses the existing windows token it receives when the user logged into his windows account. If you change the password, the windows session still runs with the old credentials. You have to log in and out of your windows session in order to update the cached credentials.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With