c# - 更改密码后 WCF 服务上的 Windows 身份验证失败
问题描述
我们有一个 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
我们曾尝试再次重置她的密码,但没有帮助。
解决方案
Control Panel -> User Accounts -> Manage your credentials -> Windows Credentials
列表中有一个条目指向我们无法访问的服务器。我们删除了它,用户可以毫无问题地访问该服务。
用户似乎使用 mstsc 或类似工具访问了服务器,并输入了 upn 用户名格式 user@company.com 并保存了密码。当她更改密码时,这并没有得到更新,并且由于某种原因,wcf 在访问服务时使用这些凭据而不是默认凭据。
推荐阅读
- javascript - JavaScript循环中的复利计算器
- javascript - 使用 router-link 后折叠行不起作用
- java - XAMPP 上的 Apache,Tomcat 9(不在 XAMPP 上)HTTP PATCH 501 方法未实现
- amazon-sns - AWS VPC 到 SNS 服务的私有链接
- angular - 为什么 Ionic 4 从 POST 请求返回 404?
- excel - 使用 VBA 发送电子邮件
- php - 使用 db::paginate() 时 laravel API 资源收集错误中的“不能使用 stdClass 类型的对象作为数组”
- c - C printf 说明符 %lld 打印字符“ld”
- python - 无法删除 twilio api 中的拨出呼叫者 ID
- amazon-web-services - ECS 服务 ARN 的实际结构是什么?