9

我有一个使用 WCF 代理来调用服务的客户端。凭据和其他功能正常工作,但如果用户更改了他们的域密码并且我重新启动了应用程序,那么由于此错误,我无法调用该服务:

System.ServiceModel.Security.SecurityNegotiaionException-> 服务器已拒绝客户端凭据。

System.Security.Authentication.InvalidCredentialException-> 服务器已拒绝客户端凭据。

System.componentmodel.Win32Exception -> 登录尝试失败。

显然,我知道用户的凭据已更改,但如何刷新CredentialCache以反映新凭据,以便 WCF 调用成功?

4

1 回答 1

6

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.

于 2013-10-06T18:30:23.473 回答