更改密码后,WCF服务上的Windows身份验证失败

时间:2019-05-29 13:13:48

标签: c# windows wcf wcf-security

我们有一个Windows服务,其中托管了一些通过wsHttpBindings进行身份验证的wcf Web服务。用户遇到身份验证问题,结果证明她的密码已过期。然后,她更改了密码并重新启动计算机。更改密码后,她不再能够访问Web服务。她收到了

System.ServiceModel.Security.SecurityNegotiationException: The caller was not authenticated by the service. ---> System.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.

在服务器上,我们启用了服务跟踪,并且在用户尝试调用服务时出现错误:

System.ComponentModel.Win32Exception (0x80004005): The Security Support Provider Interface (SSPI) negotiation failed.

然后我们在服务器上的事件视图中检查了Windows日志->安全性并找到

帐户无法登录。

Subject:
    Security ID:        NULL SID
    Account Name:       -
    Account Domain:     -
    Logon ID:       0x0

Logon Type:         3

Account For Which Logon Failed:
    Security ID:        NULL SID
    Account Name:       user@compyany.com
    Account Domain:     

Failure Information:
    Failure Reason:     Unknown user name or bad password.
    Status:         0xc000006d
    Sub Status:     0xc0000064

我们尝试再次重置她的密码,但这无济于事。

1 个答案:

答案 0 :(得分:0)

Control Panel -> User Accounts -> Manage your credentials -> Windows Credentials

列表中只有一个条目,该条目指向我们无法访问的服务器。 我们将其删除,用户可以正常使用该服务。

似乎用户已使用mstsc或类似名称访问服务器,并输入了upn用户名格式user@company.com并保存了密码。当她更改密码时,该密码没有更新,并且由于某种原因,wcf在访问服务时使用了这些凭据,而不是默认凭据。