How to refuse a long-term search in System.DirectoryServices.Protocols

I was trying to figure out how to cancel a long AD search in System.DirectoryServices.Protocols. Can anyone help?

I looked at the supportControl / supportedCapabilities attributes on RootDSE and they do not contain OID 1.3.6.1.1.8, so I think it means that it does not support the extended CANCEL LDAP operation, as defined here: http://tools.ietf.org / html / rfc3909

This leaves the original LDAP ABANDON command (see here for a list). But it looks like there is no DirectoryRequest Class .

Does anyone have any idea?

+3
source share
3

, : , , Abort LdapConnection. : LDAP, , LDAPMessage, MS, , . - LDAP, MS, , MS , .

+1
0

If the request also returns a lot of data, you can refuse it through paging . Specify the PageResultRequestControl option in the request, giving a rather low page size (IIUC, 1000 - default page size). IIUC, you will be sending new requests every time you have a page (passing cookies from one response to the next request). When you decide to cancel the request, send another request with zero expected results.

0
source

Source: https://habr.com/ru/post/1714374/


All Articles