ArgumentNullException thrown from LdapConnection.SendRequest
I am trying to hit AD with LdapConnection.SendRequest. I am getting a null reference exception from it.
System.ArgumentNullException Value cannot be null.
Parameter name: SafeHandle cannot be null. at System.StubHelpers.StubHelpers.SafeHandleAddRef(SafeHandle pHandle, Boolean& success)
at System.DirectoryServices.Protocols.Wldap32.ldap_parse_result(ConnectionHandle ldapHandle, IntPtr result, Int32& serverError, IntPtr& dn, IntPtr& message, IntPtr& referral, IntPtr& control, Byte freeIt)
at System.DirectoryServices.Protocols.LdapConnection.ConstructParsedResult(IntPtr ldapResult, Int32& serverError, String& responseDn, String& responseMessage, Uri[]& responseReferral, DirectoryControl[]& responseControl)
at System.DirectoryServices.Protocols.LdapConnection.ConstructResponse(Int32 messageId, LdapOperation operation, ResultAll resultType, TimeSpan requestTimeOut, Boolean exceptionOnTimeOut)
at System.DirectoryServices.Protocols.LdapConnection.SendRequest(DirectoryRequest request, TimeSpan requestTimeout)
This is an intermittent issue. The AD machine that I'm trying to connect is a Windows Server 2008 R2 Domain Controller (It is a local setup for testing purpose). Also, the .Net Framework installed is .Net Framework 4.6.2.
@alenjalex note that we track only .NET Core issues in this repo. For "big" .NET Framework bugs, please use support or Connect. Note that DirectoryServices is not fully brought up yet in .NET Core (work in progress).
oh... my bad... :) Thanks @karelz . Will do accordingly.
@tquerec is it something you want to track in .NET Core for future? Otherwise, please close.
Closing as issue is being tracked in the .NET desktop bug database.
FYI: @tquerec I added the 'netfx-port-consider' label, which will make sure we pay attention to it in .NET Framework database where the issue will be mirror (when we're ready to fund that work).