Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
491 views
in Technique[技术] by (71.8m points)

Access Denied with LDAP and C#

Using LDAP with DirectoryEntry or PrincipalContext in C# worked fine, I could read AD, change properties, yet when creating users or groups I got Access Denied. Even when I use the Administrator account to login on AD through my application.

Going to the AD Machine and use the same credentials I was able to create groups/users... So what is going wrong here?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Seems that the C# Application I am running also need Administrator Rights, at least more right then my curren account had... Once I ran my application with Administrator accounts I was able to create groups / users without an Access Denied error.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...