简体   繁体   English

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

[英]Windows authentication on a WCF service fails after password change

We have a windows service hosting some wcf web services that are authenticated with wsHttpBindings. 我们有一个Windows服务托管一些使用wsHttpBindings验证的wcf Web服务。 A user experienced authentication issues and it turned out her password had expired. 用户遇到身份验证问题,结果证明她的密码已过期。 She then changed her password and restarted the computer. 然后她更改了密码并重新启动了计算机。 After this password change she was no longer able to access the web services. 密码更改后,她无法再访问Web服务。 She received 她收到了

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.

On the server we had service tracing enabled and the error appears when the user attempted to call the service: 在服务器上,我们启用了服务跟踪,并在用户尝试调用服务时显示错误:

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

We then checked the Windows Logs -> Security in Event View on the server and find 然后,我们在服务器上的事件视图中检查了Windows日志 - >安全性并查找

An account failed to log on. 帐户无法登录。

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

We have tried resetting her password again but that did not help. 我们已经尝试重新设置密码,但这没有帮助。

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

There was one entry in the list which was to the server we had problems accessing. 列表中有一个条目是我们访问时遇到问题的服务器。 We deleted it and the user was able to access the service without issue. 我们删除了它,用户可以毫无问题地访问该服务。

It seems that the user had accessed the server using mstsc or similar and entered a upn username format user@company.com and saved the password. 用户似乎使用mstsc或类似设备访问了服务器,并输入了upn用户名格式user@company.com并保存了密码。 This did not get updated when she changed her password and for some reason wcf uses these credentials when accessing the service instead of the default. 当她更改密码时没有更新,并且出于某种原因,wcf在访问服务时使用这些凭据而不是默认密码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM