[英]How to upgrade a Console app from .net 5 to .net 7 to use DirectoryServices
要連接到ldap服務器,我想在c# 控制台應用程序中使用目錄服務。 這些服務在do.net-7.0中可用因此我需要從do.net-5.0升級這些是重現的步驟: 在控制台上執行這些命令do.net new console -f.net5.0 -o=ConsoleFiveToSeven cd Cons ...
[英]How to upgrade a Console app from .net 5 to .net 7 to use DirectoryServices
要連接到ldap服務器,我想在c# 控制台應用程序中使用目錄服務。 這些服務在do.net-7.0中可用因此我需要從do.net-5.0升級這些是重現的步驟: 在控制台上執行這些命令do.net new console -f.net5.0 -o=ConsoleFiveToSeven cd Cons ...
[英]System.Directory Services not supported on windows platform
我對軟件開發和這個網站都很陌生。 My question is about the System.DirectoryServices development on windows. I started a normal Visual Studio 2019 c# .net 5.0 project ...
[英]What is the equivalent of Invoke("SetOption") in System.DirectoryServices.Protocols?
我有一個舊的 .NET 庫執行以下操作:const int adsOptionPasswordMethod = 7; const int adsPasswordEncodeClear = 0; user.Invoke ("SetOption", new object[] { adsOptionPa ...
[英]C# Unit Test: How to create test input of COM Interop value?
在我的應用程序中,有一個方法接受Object ,然后對其執行一些操作以返回 C# long值。 在運行時,從 Active Directory 收到的Object是一個IADSLargeInteger 。 在為此代碼編寫單元測試時,我無法創建這樣一個 object 來傳遞到被測試的方法中。 如何為 ...
[英]Query Active Directory for distinct values in a given field (e.g. Country) via DirectoryServices
我需要以編程方式檢索 Active Directory 中給定字段的所有不同值(例如,國家字段“co” - 但我會有其他字段)我不在乎給定值出現了多少次或誰/什么它與-我只需要當前在其中的不同國家/地區的列表。 我有這個可以生成列表 - 但由於明顯的原因,它的速度慢得令人無法接受,因為它正在查詢 A ...
[英]How is PrincipalContext.ValidateCredentials call registered or marked on DC?
我正在使用System.DirectoryServices.AccountManagement命名空間中的PrincipalContext.ValidateCredentials方法針對 Active Directory LDAP 服務器驗證用戶憑據。 代碼示例: 客戶環境中有一個域和多個(6 個 ...
[英]How to do a search of LDAP user data on Apache Directory Studio with System.DirectoryServices?
我連接到 Apache Directory Studio 的 LDAP 服務器上,並使用他的憑據綁定用戶,但現在我想獲取他自己的數據,如郵件、電話號碼等。如何在 System.DirectoryServices 中做到這一點? 這是我到目前為止所做的事情? 它奏效了。 現在,如何使用 System ...
[英]Checking write access on AD attributes (allowedAttributesEffective is empty)
如何使用 C# 檢查用戶是否在 Active Directory 中具有寫入權限? 我運行它來授予用戶對屬性的寫訪問權限: dsacls "OU=Users,OU=OrgABC,DC=foo,DC=local" /G "FOO\example.user:WP;title;user" /I:S 目 ...
[英]How do I get the domain name of a user from a machine not joined to the domain?
我正在使用SystemDirectorySevices從未加入域的機器上的本地活動目錄中獲取用戶信息。 以下用於獲取用戶域名的代碼在已加入域的機器上運行,而不是在未加入域的機器上運行。 我需要域名,如MyDomain\myuser ,但我假設上述方法取決於與域控制器的關系。 在這種情況下我有什么 ...
[英]PowerShell - Error when querying AD if user enters credentials
嘗試為我的 IT 幫助台團隊創建一個基本腳本,以查詢我們的 AD 以查看計算機的主機名是否已經在域中。 我希望它不需要任何模塊,因此它可以在任何 Windows 計算機上運行而無需其他軟件(因此我使用的是DirectoryServices )。 公司編碼政策也阻止我預定義憑據,因此我想將其設為用戶 ...
[英]Can not create object of DirectorySearcher class with Visual C++ with project reference of System.DirectoryServices.dll
System.DirectoryServices.dll 文件已通過解決方案資源管理器中的引用成功添加到 Visual C++ 項目中。 Microsoft 開發環境 2003 版本 7.1.3088。 Microsoft.Net Framework 1.1 版本 1.1.4322 通過這種 ...
[英]Unable to load shared library 'libldap-2.4.so.2' or one of its dependencies
團隊, 嘗試在 docker 上運行時出現以下錯誤。它在 windows 機器上工作正常- 無法加載共享庫“libldap-2.4.so.2”或其依賴項之一。 為了幫助診斷加載問題,考慮設置 LD_DEBUG 環境變量:liblibldap-2.4.so.2: cannot open shared ...
[英]Can I get updates (DirSync Cookie) in Active Directory with paging?
我正在使用 DirSync Control (Cookie) 使用以下技術獲取最新更改。 是否有可能通過分頁獲得該結果? https://docs.microsoft.com/en-us/windows/win32/ad/polling-for-changes-using-the-dirsync ...
[英]LDAP Error: The user has insufficient access rights. : LdapErr: DSID-0C09099D, comment: Error processing control,
我想使用 C# 從 Active Directory 獲取增量更改,為此我正在嘗試構建一個解決方案,如以下文章中所述(使用 DirSync Control)。 https://docs.microsoft.com/en-us/windows/win32/ad/polling-for-change ...
[英]Unable to get Changes Using uSNChanged
我想使用 C# 從 Active Directory 獲取增量更改。 為此,我正在嘗試構建以下文章中提到的解決方案。 https://docs.microsoft.com/en-us/windows/win32/ad/polling-for-changes-using-usnchanged 但是, ...
[英]Is it possible to add SearchResultCollections together? Or return more than one?
我在 ActiveDirectory 中搜索,我必須讓事情快速執行。 可悲的是,我需要在不同的域和不同的 OU-s 中進行搜索。 我的目標是編寫一個 function 進行多次搜索,並返回所有搜索的結果。 遺憾的是,SearchResultCollections 不能加在一起。 我認為將它們轉換為 ...
[英]Cannot get LDAP data using System.DirectoryServices.AccountManagement on IIS hosted app
我正在使用 System.DirectoryServices.AccountManagement Package 從 LDAP 獲取用戶數據,它在我的本地機器上運行良好,但在服務器上,它給出了錯誤消息: **發生操作錯誤。 ** .NET 核心版本是 3.1,System.DirectoryS ...
[英]Assembly 'system.directoryservices.accountmanagement' was not found in the SQL catalog
我正在使用 Visual Studio 在 VB.Net 中為 SQL 數據庫編寫 CLR 程序集。 當我嘗試部署我的項目時出現此錯誤: 在 SQL 目錄中找不到程序集“system.directoryservices.accountmanagement” system.directoryser ...
[英]InvalidCastException when trying to obtain UserPrincipal.Current
我有一個 PowerShell 腳本,它在啟動過程中檢查當前登錄的用戶。 我正在使用 .Net 通過添加程序集來執行此操作: 對於幾乎每個人來說,這都很好,我得到了一個 UserPrincipal object,我可以在其他地方使用它,但是有幾個用戶在運行它時遇到以下錯誤: 這是在標准的 Wind ...
[英]How can I set an Extended UserPrincipal Array Property as empty with System.Directory.AccountManagement
正如標題中提到的,我使用 Account Management API 的 Principal Extensions 來獲取和設置自定義 AD 用戶屬性。 其中兩個自定義屬性是字符串數組。 我現在遇到的問題是,當我嘗試將屬性設置為空數組時,我會收到錯誤消息。 我的擴展 UserPrincipal ...