System.DirectoryServices.DirectorySearcher causing “Arithmetic operation resulted in overflow” errors
问题 I'm getting the following intermittent errors related to querying AD using DirectorySearcher.FindOne() or FindAll() . System.OverflowException: Arithmetic operation resulted in an overflow. at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.GetCurrentResult() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.get_Current() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.System.Collections.IEnumerator.get_Current() This is happening in a