Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

c# - .Net Web App - How to make an LDAP connection using directory entry over UDP port 389

I am attempting to make an LDAP connection to query active directory groups in my web application and by default it uses port 389 and connects via the TCP protocol. However due to security reasons i am only able to use port 389 via the UDP protocol but I am looking for help in how to code a way to connect to the active directory using the UDP protocol.

Currently I am using the DirectoryEntry class https://docs.microsoft.com/en-us/dotnet/api/system.directoryservices.directoryentry?view=dotnet-plat-ext-5.0 and running the web app in .net 4.8. I am looking to use to it to load all groups and members.

I have searched quite a bit and the only information i have found is that LDAP can be run over UDP and that particular method is referred to as cLDAP (connectionless LDAP) but cant find any information in how to code that.

Edit: After researching, i found this: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/3fad0ec9-414c-432a-ba0b-837c74091dd6 which states "Active Directory supports search over UDP only for searches against rootDSE". And specifically what I have found is that rootDSE gives information about the active directory itself but not the groups inside.

question from:https://stackoverflow.com/questions/65939564/net-web-app-how-to-make-an-ldap-connection-using-directory-entry-over-udp-por

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

1 Reply

0 votes
by (71.8m points)

After researching, i found this: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/3fad0ec9-414c-432a-ba0b-837c74091dd6 which states "Active Directory supports search over UDP only for searches against rootDSE". And specifically what I have found is that rootDSE gives information about the active directory itself but not the groups inside.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...