cost 120 ms
如何將控制台應用程序從 .net 5 升級到 .net 7 以使用 DirectoryServices

[英]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 ...

C# 單元測試:如何創建 COM Interop 值的測試輸入?

[英]C# Unit Test: How to create test input of COM Interop value?

在我的應用程序中,有一個方法接受Object ,然后對其執行一些操作以返回 C# long值。 在運行時,從 Active Directory 收到的Object是一個IADSLargeInteger 。 在為此代碼編寫單元測試時,我無法創建這樣一個 object 來傳遞到被測試的方法中。 如何為 ...

通過 DirectoryServices 在給定字段(例如國家/地區)中查詢 Active Directory 中的不同值

[英]Query Active Directory for distinct values in a given field (e.g. Country) via DirectoryServices

我需要以編程方式檢索 Active Directory 中給定字段的所有不同值(例如,國家字段“co” - 但我會有其他字段)我不在乎給定值出現了多少次或誰/什么它與-我只需要當前在其中的不同國家/地區的列表。 我有這個可以生成列表 - 但由於明顯的原因,它的速度慢得令人無法接受,因為它正在查詢 A ...

PrincipalContext.ValidateCredentials 調用如何在 DC 上注冊或標記?

[英]How is PrincipalContext.ValidateCredentials call registered or marked on DC?

我正在使用System.DirectoryServices.AccountManagement命名空間中的PrincipalContext.ValidateCredentials方法針對 Active Directory LDAP 服務器驗證用戶憑據。 代碼示例: 客戶環境中有一個域和多個(6 個 ...

如何使用 System.DirectoryServices 在 Apache Directory Studio 上搜索 LDAP 用戶數據?

[英]How to do a search of LDAP user data on Apache Directory Studio with System.DirectoryServices?

我連接到 Apache Directory Studio 的 LDAP 服務器上,並使用他的憑據綁定用戶,但現在我想獲取他自己的數據,如郵件、電話號碼等。如何在 System.DirectoryServices 中做到這一點? 這是我到目前為止所做的事情? 它奏效了。 現在,如何使用 System ...

如何從未加入域的計算機中獲取用戶的域名?

[英]How do I get the domain name of a user from a machine not joined to the domain?

我正在使用SystemDirectorySevices從未加入域的機器上的本地活動目錄中獲取用戶信息。 以下用於獲取用戶域名的代碼在已加入域的機器上運行,而不是在未加入域的機器上運行。 我需要域名,如MyDomain\myuser ,但我假設上述方法取決於與域控制器的關系。 在這種情況下我有什么 ...

PowerShell - 如果用戶輸入憑據,則查詢 AD 時出錯

[英]PowerShell - Error when querying AD if user enters credentials

嘗試為我的 IT 幫助台團隊創建一個基本腳本,以查詢我們的 AD 以查看計算機的主機名是否已經在域中。 我希望它不需要任何模塊,因此它可以在任何 Windows 計算機上運行而無需其他軟件(因此我使用的是DirectoryServices )。 公司編碼政策也阻止我預定義憑據,因此我想將其設為用戶 ...

無法使用 System.DirectoryServices.dll 的項目引用使用 Visual C++ 創建 DirectorySearcher class 的 object

[英]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 通過這種 ...

無法加載共享庫“libldap-2.4.so.2”或其依賴項之一

[英]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 ...

LDAP 錯誤:用戶訪問權限不足。 :LdapErr:DSID-0C09099D,注釋:錯誤處理控制,

[英]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 ...

是否可以一起添加 SearchResultCollections? 還是返回多個?

[英]Is it possible to add SearchResultCollections together? Or return more than one?

我在 ActiveDirectory 中搜索,我必須讓事情快速執行。 可悲的是,我需要在不同的域和不同的 OU-s 中進行搜索。 我的目標是編寫一個 function 進行多次搜索,並返回所有搜索的結果。 遺憾的是,SearchResultCollections 不能加在一起。 我認為將它們轉換為 ...

無法使用 IIS 托管應用程序上的 System.DirectoryServices.AccountManagement 獲取 LDAP 數據

[英]Cannot get LDAP data using System.DirectoryServices.AccountManagement on IIS hosted app

我正在使用 System.DirectoryServices.AccountManagement Package 從 LDAP 獲取用戶數據,它在我的本地機器上運行良好,但在服務器上,它給出了錯誤消息: **發生操作錯誤。 ** .NET 核心版本是 3.1,System.DirectoryS ...

在 SQL 目錄中找不到程序集“system.directoryservices.accountmanagement”

[英]Assembly 'system.directoryservices.accountmanagement' was not found in the SQL catalog

我正在使用 Visual Studio 在 VB.Net 中為 SQL 數據庫編寫 CLR 程序集。 當我嘗試部署我的項目時出現此錯誤: 在 SQL 目錄中找不到程序集“system.directoryservices.accountmanagement” system.directoryser ...

嘗試獲取 UserPrincipal.Current 時出現 InvalidCastException

[英]InvalidCastException when trying to obtain UserPrincipal.Current

我有一個 PowerShell 腳本,它在啟動過程中檢查當前登錄的用戶。 我正在使用 .Net 通過添加程序集來執行此操作: 對於幾乎每個人來說,這都很好,我得到了一個 UserPrincipal object,我可以在其他地方使用它,但是有幾個用戶在運行它時遇到以下錯誤: 這是在標准的 Wind ...

如何使用 System.Directory.AccountManagement 將擴展 UserPrincipal 數組屬性設置為空

[英]How can I set an Extended UserPrincipal Array Property as empty with System.Directory.AccountManagement

正如標題中提到的,我使用 Account Management API 的 Principal Extensions 來獲取和設置自定義 AD 用戶屬性。 其中兩個自定義屬性是字符串數組。 我現在遇到的問題是,當我嘗試將屬性設置為空數組時,我會收到錯誤消息。 我的擴展 UserPrincipal ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM