简体   繁体   English

Active Directory中的旧用户名

[英]Old username in Active Directory

I have WCF service with Windows authentication. 我有Windows身份验证的WCF服务。 To identify client user on the service side I'm using following code: ServiceSecurityContext.Current.PrimaryIdentity.Name . 为了标识服务端的客户端用户,我使用以下代码: ServiceSecurityContext.Current.PrimaryIdentity.Name

That returns me string in the form: 'domain\\janedoe'. 这将返回以下形式的字符串:'domain \\ janedoe'。

Jane Doe became married and changed last name. Jane Doe结婚并改名。 Active Directory administrator also renamed her user id. Active Directory管理员还重命名了她的用户ID。 So now she logs into AD as 'domain\\janesmith'. 所以现在她登录AD作为'domain \\ janesmith'。

My issue is that ServiceSecurityContext.Current.PrimaryIdentity.Name still returns old one - 'domain\\janedoe'. 我的问题是ServiceSecurityContext.Current.PrimaryIdentity.Name仍然返回旧的-“ domain \\ janedoe”。

Do you have some suggestions on where to start with this ? 你有什么建议从这开始吗?

There is some caching mechanism in Active Directory. Active Directory中有一些缓存机制。

Maybe this link will help you link 也许这个链接可以帮助您链接

I had a similar problem with a web app I was running in IIS 6. The only thing that would ever work for me to clear the cache was to restart the server. 我在IIS 6中运行的Web应用程序遇到了类似的问题。清除缓存对我来说唯一有用的就是重启服务器。 Our AD admin was completely unhelpful/out of his depth so I eventually just re-wrote the page to grab the sid. 我们的广告管理员完全没有帮助/超出他的深度,所以我最终只是重新编写了页面以获取sid。 Then if I needed the username I would do an LDAP query on the sid to get the user name. 然后,如果我需要用户名,我会在sid上进行LDAP查询以获取用户名。

How about using Softerra LDAP Browser (the free version 2.6) to see what attributes are available and to see which field could have possibly been read from? 如何使用Softerra LDAP浏览器 (免费版本2.6)查看可用的属性并查看可能从中读取哪个字段?

Then you could investigate further; 然后你可以进一步调查; maybe the change of her name did not cover all necessary attributes. 也许她名字的改变并没有涵盖所有必要的属性。

Addition: 加成:

Also, if you have multiple domain controllers that replicate their information, there could be some delay, until they all have up-to-date data. 此外,如果您有多个域控制器复制其信息,可能会有一些延迟,直到它们都有最新数据。

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

相关问题 Active Directory-检查用户名/密码 - Active Directory - Check username / password 验证Active Directory用户名和密码 - Validating Active Directory username and password 按用户名搜索整个 Active Directory 林 - Search Entire Active Directory Forest by username 检查 Microsoft Azure Active Directory 中是否存在用户名 - Check if username exist in Microsoft Azure Active Directory 针对 Active Directory 验证用户名和密码? - Validate a username and password against Active Directory? Active Directory / LDPA 未使用长用户名进行身份验证 - Active Directory / LDPA is not being authenticated with long Username 根据Active Directory对用户进行身份验证,但需要输入用户名和密码 - Authenticate users against Active Directory, but require username and password to be inputted 共享点,读取用户名以查询Active Directory和筛选器列表 - Sharepoint, Reading Username to Query Active Directory and Filter List Active Directory:如何从登录控件中检索用户名和密码 - Active Directory : how to retrieve username and password from Login control 如何从C#中的显示名称获取Active Directory中的用户名? - How to get a username in Active Directory from a display name in C#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM