Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
QuestionPass DataGridView to a UserControl Pin
mariusth5-May-08 3:51
mariusth5-May-08 3:51 
QuestionThreading question Pin
kensai5-May-08 3:48
kensai5-May-08 3:48 
AnswerRe: Threading question Pin
carbon_golem5-May-08 4:05
carbon_golem5-May-08 4:05 
AnswerRe: Threading question Pin
S. Senthil Kumar5-May-08 4:11
S. Senthil Kumar5-May-08 4:11 
GeneralRe: Threading question Pin
kensai5-May-08 21:28
kensai5-May-08 21:28 
Questionrunning script using Sqlcmd Pin
Denver Thomas5-May-08 3:45
Denver Thomas5-May-08 3:45 
QuestionInvalid Cast Problem using Enterprise Library MS DAAB (with dynamic dll loading) Pin
Pankaj Chamria5-May-08 3:21
Pankaj Chamria5-May-08 3:21 
QuestionAdding Active Directory Users to local Groups Pin
André Stroebel5-May-08 3:05
André Stroebel5-May-08 3:05 
I am trying to add a AD user to a local group, but keep on getting an exception:

ex Message - Exception has been thrown by the target of an invocation.

ex InnerException - An invalid directory pathname was passed
<br />
DirectoryEntry activeDirectory = new DirectoryEntry("LDAP://DomainName.com", LoggedOnUser, LoggedOnPassword);<br />
DirectorySearcher dsUsers = new DirectorySearcher(activeDirectory);<br />
<br />
dsUsers.Filter = "samaccountname=" + userName;<br />
<br />
SearchResult srCheckUser;<br />
if ((srCheckUser = dsUsers.FindOne()) != null)<br />
{<br />
     //User Found.<br />
     DirectoryEntry newUser = srCheckUser.GetDirectoryEntry();<br />
     //Set up currentGroup......<br />
     currentGroup.Invoke("Add", new object[] { newUser.Path.ToString() });<br />
}<br />
<code> 

AnswerRe: Adding Active Directory Users to local Groups Pin
André Stroebel5-May-08 3:26
André Stroebel5-May-08 3:26 
QuestionDataGridView Selection Pin
stancrm5-May-08 3:03
stancrm5-May-08 3:03 
AnswerRe: DataGridView Selection Pin
Csharp™5-May-08 10:46
Csharp™5-May-08 10:46 
QuestionHow to global access from other forms? Pin
daden2035-May-08 2:53
daden2035-May-08 2:53 
AnswerRe: How to global access from other forms? Pin
Christian Graus5-May-08 2:54
protectorChristian Graus5-May-08 2:54 
GeneralRe: How to global access from other forms? Pin
daden2035-May-08 3:16
daden2035-May-08 3:16 
Questionwhat happens if value is longer than fieldlength Pin
stephan_0075-May-08 2:45
stephan_0075-May-08 2:45 
AnswerRe: what happens if value is longer than fieldlength Pin
Christian Graus5-May-08 2:55
protectorChristian Graus5-May-08 2:55 
AnswerRe: what happens if value is longer than fieldlength Pin
Gareth H5-May-08 2:55
Gareth H5-May-08 2:55 
GeneralRe: what happens if value is longer than fieldlength Pin
stephan_0075-May-08 3:00
stephan_0075-May-08 3:00 
GeneralRe: what happens if value is longer than fieldlength [modified] Pin
stephan_0075-May-08 3:03
stephan_0075-May-08 3:03 
AnswerRe: what happens if value is longer than fieldlength Pin
SomeGuyThatIsMe5-May-08 2:57
SomeGuyThatIsMe5-May-08 2:57 
GeneralRe: what happens if value is longer than fieldlength Pin
stephan_0075-May-08 3:16
stephan_0075-May-08 3:16 
GeneralRe: what happens if value is longer than fieldlength Pin
SomeGuyThatIsMe5-May-08 3:31
SomeGuyThatIsMe5-May-08 3:31 
QuestionUsing "DictationGrammar" to dictate a URL Pin
thoraia5-May-08 2:37
thoraia5-May-08 2:37 
QuestionDynamic workflow Project Pin
Thaer Hamael5-May-08 2:00
Thaer Hamael5-May-08 2:00 
AnswerCP Members: question already asked Pin
leckey5-May-08 17:40
leckey5-May-08 17:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.