runtime icon indicating copy to clipboard operation
runtime copied to clipboard

ArgumentNullException thrown from LdapConnection.SendRequest

Open alenjalex-zz opened this issue 9 years ago • 5 comments

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.

I also found similar issues here and here.

alenjalex-zz avatar Mar 13 '17 10:03 alenjalex-zz

@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).

karelz avatar Mar 13 '17 17:03 karelz

oh... my bad... :) Thanks @karelz . Will do accordingly.

alenjalex-zz avatar Mar 14 '17 09:03 alenjalex-zz

@tquerec is it something you want to track in .NET Core for future? Otherwise, please close.

karelz avatar Mar 14 '17 18:03 karelz

Closing as issue is being tracked in the .NET desktop bug database.

tquerec avatar Apr 06 '17 17:04 tquerec

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).

karelz avatar Apr 07 '17 06:04 karelz