Click here to Skip to main content
15,920,606 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: it don't fire session_end event when session timed out Pin
Guffa9-Nov-06 23:20
Guffa9-Nov-06 23:20 
GeneralRe: it don't fire session_end event when session timed out Pin
vurugonda12-Nov-06 20:11
vurugonda12-Nov-06 20:11 
QuestionEncryption and Decryption in ASP.NET(C#) Pin
Malayil alex9-Nov-06 19:32
Malayil alex9-Nov-06 19:32 
AnswerRe: Encryption and Decryption in ASP.NET(C#) Pin
_AK_9-Nov-06 19:37
_AK_9-Nov-06 19:37 
Questionconvert doc file to xml Pin
miniThomas9-Nov-06 19:24
miniThomas9-Nov-06 19:24 
AnswerRe: convert doc file to xml Pin
ednrgc10-Nov-06 3:57
ednrgc10-Nov-06 3:57 
GeneralRe: convert doc file to xml Pin
RichardGrimmer10-Nov-06 4:25
RichardGrimmer10-Nov-06 4:25 
QuestionProblem changing user password in ActiveDirectory Pin
ronkelly9-Nov-06 18:37
ronkelly9-Nov-06 18:37 
Hi there,

I'm trying to change a password in Active Directory using C# & ASP.NET, I've tried 2 ways but can't get it working.


Method 1
---------
The conn.SendRequest() method raised a DirectoryOperationException (the server is
unvailable). However the server is available.

try
{
LdapConnection conn = new LdapConnection(serverName);
conn.Bind(new NetworkCredential(userName, currentPassword, domainName));

DirectoryAttributeModification deleteMod = new DirectoryAttributeModification();
deleteMod.Name = "unicodePwd";
deleteMod.Add(GetPasswordData(currentPassword)); //encrypt
deleteMod.Operation = DirectoryAttributeOperation.Delete;

DirectoryAttributeModification addMod = new DirectoryAttributeModification();
addMod.Name = "unicodePwd";
addMod.Add(GetPasswordData(newPassword));
addMod.Operation = DirectoryAttributeOperation.Add;

ModifyRequest request = new ModifyRequest(userName, deleteMod, addMod);

DirectoryResponse response = conn.SendRequest(request);

conn.Dispose();
}
catch
{
throw;
}


Method 2
--------

de.Invoke raises a DirectoryServicesCOMException (an invalid dn syntax has been specified)

string strADSIPath = @"LDAP://CN=username,DC=companyname,DC=net,DC=au";
DirectoryEntry de = new DirectoryEntry(strADSIPath);

try
{
de.Invoke("ChangePassword", new object[] { currentPassword, newPassword });
de.CommitChanges();
}
catch
{
throw;
}

de.Close();


I can't work it out, any help would be greatly appreciated,
Cheers,
Ron.

QuestionTop News Headlines with C# Pin
robert1109-Nov-06 18:18
robert1109-Nov-06 18:18 
AnswerRe: Top News Headlines with C# Pin
saqib829-Nov-06 19:37
saqib829-Nov-06 19:37 
AnswerRe: Top News Headlines with C# Pin
ednrgc10-Nov-06 4:01
ednrgc10-Nov-06 4:01 
QuestionAvoid Postback using Adobe Flex2 Pin
Yogesh Jamkhindikar9-Nov-06 18:09
Yogesh Jamkhindikar9-Nov-06 18:09 
AnswerRe: Avoid Postback using Adobe Flex2 Pin
ednrgc10-Nov-06 4:28
ednrgc10-Nov-06 4:28 
AnswerRe: Avoid Postback using Adobe Flex2 Pin
ednrgc10-Nov-06 4:29
ednrgc10-Nov-06 4:29 
Question"avg function" Pin
ravikiranreddydharmannagari9-Nov-06 18:08
ravikiranreddydharmannagari9-Nov-06 18:08 
AnswerRe: "avg function" Pin
PavanPareta9-Nov-06 18:43
PavanPareta9-Nov-06 18:43 
AnswerRe: "avg function" Pin
Guffa9-Nov-06 23:23
Guffa9-Nov-06 23:23 
Questionsorting accordingly the text selected in dropdownlist Pin
yogita charhate9-Nov-06 18:05
yogita charhate9-Nov-06 18:05 
AnswerRe: sorting accordingly the text selected in dropdownlist Pin
Imran Khan Pathan9-Nov-06 18:39
Imran Khan Pathan9-Nov-06 18:39 
QuestionIs the Sql express free version database is enough to handle the number of users? Pin
veerugadde9-Nov-06 10:28
veerugadde9-Nov-06 10:28 
GeneralRe: Is the Sql express free version database is enough to handle the number of users? Pin
Guffa9-Nov-06 14:04
Guffa9-Nov-06 14:04 
AnswerRe: Is the Sql express free version database is enough to handle the number of users? Pin
ednrgc10-Nov-06 4:02
ednrgc10-Nov-06 4:02 
QuestionHow to add the static data in to the dropdownlist which is databounded? Pin
veerugadde9-Nov-06 10:21
veerugadde9-Nov-06 10:21 
AnswerRe: How to add the static data in to the dropdownlist which is databounded? Pin
indianet9-Nov-06 11:30
indianet9-Nov-06 11:30 
QuestionIs there a tool to determine which images are unused Pin
Member 969-Nov-06 8:15
Member 969-Nov-06 8:15 

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.