I am getting an intermittent COM Exception \"An operations error occurred (0x80072020)\" (shown below) when I try and query Active Directory using the metho
Granted this is 2 years later, I ran into this and found that the following solved my issue:
using System.Web.Hosting;
...
...
// Code here runs as the logged on user
using (HostingEnvironment.Impersonate()) {
// This code runs as the application pool user
DirectorySearcher searcher ...
}