Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
QuestionIs it in as for Internet Files, Cookie, and History? Pin
yamadakun10-Nov-05 1:09
yamadakun10-Nov-05 1:09 
Questionproblem with moving to vs 2005 Pin
Gil.Schmidt10-Nov-05 0:33
Gil.Schmidt10-Nov-05 0:33 
QuestionMultiple Connections Pin
Rashid.Mahmood9-Nov-05 23:48
Rashid.Mahmood9-Nov-05 23:48 
AnswerRe: Multiple Connections Pin
Gulfraz Khan10-Nov-05 6:22
Gulfraz Khan10-Nov-05 6:22 
GeneralRe: Multiple Connections Pin
Rashid.Mahmood11-Nov-05 2:34
Rashid.Mahmood11-Nov-05 2:34 
QuestionAbout pdb file in C# Pin
webC#9-Nov-05 22:49
webC#9-Nov-05 22:49 
AnswerRe: About pdb file in C# Pin
Heath Stewart10-Nov-05 5:20
protectorHeath Stewart10-Nov-05 5:20 
QuestionHelp needed for Active Directory code Pin
Lasse Fabricius9-Nov-05 21:49
Lasse Fabricius9-Nov-05 21:49 
Hi there,

I have a problem with the Active Directory part of the .Net framework.

In our AD setup we are allowed to read a set of variables for a user with an anonymous login. If you have a username and a password you can get a lot more information about the specific user.

This piece of code works fine for the anonymous access:

DirectoryEntry de = new DirectoryEntry(@"LDAP://servername/ou=People,o=company");<br />
DirectorySearcher ds = new DirectorySearcher(de);<br />
ds.Filter = @"(uid=username)";<br />
ds.SearchScope = SearchScope.Subtree;<br />
SearchResultCollection results = ds.FindAll();


I get the limited set of informations about the user. If I try with my logininformation

DirectoryEntry de = new DirectoryEntry(<br />
	@"LDAP://servername/ou=People,o=company",<br />
	@"cn=username,ou=SystemUsers,ou=Accounts,o=company",<br />
	@"password",<br />
	AuthenticationTypes.Secure);<br />
DirectorySearcher ds = new DirectorySearcher(de);<br />
ds.Filter = @"(uid=username)";<br />
ds.SearchScope = SearchScope.Subtree;<br />
SearchResultCollection results = ds.FindAll();


Then I just get a "Logon faliure: unknown user name or bad password".
One would then say that I have entered the wrong login information. But... When I use the exact same login information in the LDAP browser from Softerra (http://www.ldapadministrator.com/download/index.php) it works fine, and I get my extended details.
I'm Confused | :confused:

I have tried with several combinations in the AuthenticationTypes field, and I have googled the problem without success... Anyone have any ideas ?

Lasse Fabricius
QuestionDirect Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 21:10
Craig G Fraser9-Nov-05 21:10 
AnswerRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart9-Nov-05 21:56
protectorHeath Stewart9-Nov-05 21:56 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 22:32
Craig G Fraser9-Nov-05 22:32 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart9-Nov-05 22:38
protectorHeath Stewart9-Nov-05 22:38 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser9-Nov-05 23:20
Craig G Fraser9-Nov-05 23:20 
AnswerRe: Direct Crystal Printing to LPT port - Please Help Pin
Heath Stewart10-Nov-05 5:11
protectorHeath Stewart10-Nov-05 5:11 
GeneralRe: Direct Crystal Printing to LPT port - Please Help Pin
Craig G Fraser10-Nov-05 21:42
Craig G Fraser10-Nov-05 21:42 
QuestionDrawing Lines On A Form Pin
ytubis9-Nov-05 21:07
ytubis9-Nov-05 21:07 
AnswerRe: Drawing Lines On A Form Pin
Heath Stewart9-Nov-05 21:45
protectorHeath Stewart9-Nov-05 21:45 
QuestionNeed Help with .NET Pin
allenmpcx9-Nov-05 19:26
allenmpcx9-Nov-05 19:26 
AnswerRe: Need Help with .NET Pin
AETaylor10-Nov-05 22:14
AETaylor10-Nov-05 22:14 
QuestionDifferent Source Codes Pin
nosferatu20009-Nov-05 19:23
nosferatu20009-Nov-05 19:23 
AnswerRe: Different Source Codes Pin
Luis Alonso Ramos9-Nov-05 19:35
Luis Alonso Ramos9-Nov-05 19:35 
QuestionMaskedTextBox Problem ! Pin
Caio19859-Nov-05 17:42
Caio19859-Nov-05 17:42 
GeneralRe: MaskedTextBox Problem ! Pin
Heath Stewart9-Nov-05 22:11
protectorHeath Stewart9-Nov-05 22:11 
QuestionRetrieving an image data type Pin
SyedZubair9-Nov-05 17:39
SyedZubair9-Nov-05 17:39 
AnswerRe: Retrieving an image data type Pin
Heath Stewart9-Nov-05 21:59
protectorHeath Stewart9-Nov-05 21:59 

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.