c# - Active Directory connection -
I need a little help. I am new to Active Directory. I want to connect with my Active Directory C # Here I have written the sample code.
Public Zero GetConnection () {var username = "xxxx"; Var domain = "xxxx"; Var password = "xxxx"; Var path = "LDAP: // xxxx / CN = xx"; DirectoryEntry de = new directoryInterrary (SDM + "+", sDefaultOU, SU name, sServicePassword, authentication type. Serverworld); DirectorySearcher DS = New Directory Finder (D); // subtitle DS SearchScope = System Directory Services Protocol. SearchScope Subtree; Ds.Filter = "(and (objectClass = group))"; // Receive all entries that match the directory entry (domain) var sr = ds.FindAll (); If (sr! = Null) {MessageBox.Show ("Success"); } Other {MessageBox.Show ("Error"); }}}
is an error:
Can not change 'system.directoryservices.protocols.searchscope' from 'converted to system.directoryservices.searchscope'. A clear conversion turns out.
Can anyone help me?
Comments
Post a Comment