Tulpep / Active-Directory-Object-Picker

The standard Active Directory object picker dialog for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When computer is unchecked, an exception occured

vletoux opened this issue · comments

When tracking a problem when using the component, I just downloaded the source code from github, open visual studio and launched the debugger.
When playing with option, I was able to trigger the problem.

When only computer is unchecked, an exception occurs.
All other components can be unchecked, the exception doesn't occurs.
All others are default
image

image

Occurs on Windows 10 latest version x64 bits.

Any other option with computer checked works
image

Is your device domain connected? When I run the current code set as you described I cannot reproduce the error. Of note though is that my device is domain connected. This error is an error from the underlying COM object that is wrapped by this library.

yes, the computer is not part of a domain.

What is strange is that the project https://www.codeproject.com/Articles/6307/Using-the-Windows-2000-XP-Object-Selection-Dialog works perfectly with group only selection (using the c code - the c# code crashes)
In addition, I noticed that the default flags between your program and this one are not the same.

Thanks for the reference. Which default values specifically did you identify? (So I don't have to comb through all that code).

Closing as we don't receive new comments and does not happen in the test environment. Fell free to reopen if necessary.

Just for the record, on a Windows 10 computer not connected to a network and with the most recent code (62c30ed), with the same options as @vletoux 's screenshot, I get the following error dialog:
image.
before the error message.

With that error message, it is easier to see that the dialog initialization fails because it cannot find something to put in the From this location textbox. Fixing this is as easy as adding either LocalComputer or Workgroup or both in the DefaultLocations.