我使用以下代碼在停止時啓動網站。 DirectoryEntry DE = new DirectoryEntry(string.Format("IIS://localhost/W3SVC/{0}", siteID));
if ((Int32)DE.InvokeGet("ServerState") != MD_SERVER_STATE_STARTED)
DE.Invoke("Start")
我試圖做一個LDAP搜索,但是我不斷收到以下錯誤: Unhandled Exception: System.Runtime.InteropServices.COMException (0x80072024): T
he administrative limit for this request was exceeded.
at System.DirectoryServices.Sea
我正在嘗試獲取Windows登錄對話框中可用的所有域(在域下拉列表中)。 我試過下面的代碼,但它只返回我登錄到的域。我錯過了什麼嗎? StringCollection domainList = new StringCollection();
try
{
DirectoryEntry en = new DirectoryEntry();
// Search for objec