Click here to Skip to main content
15,927,744 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: data formatting in datagrid Pin
_AK_9-Nov-06 20:18
_AK_9-Nov-06 20:18 
AnswerRe: data formatting in datagrid Pin
ednrgc10-Nov-06 3:53
ednrgc10-Nov-06 3:53 
QuestionRegarding displaying images in datagrid Pin
sdaniel_cst9-Nov-06 19:53
sdaniel_cst9-Nov-06 19:53 
AnswerRe: Regarding displaying images in datagrid Pin
_AK_9-Nov-06 19:56
_AK_9-Nov-06 19:56 
AnswerRe: Regarding displaying images in datagrid Pin
postmaster@programmingknowledge.com10-Nov-06 2:21
postmaster@programmingknowledge.com10-Nov-06 2:21 
AnswerRe: Regarding displaying images in datagrid Pin
ednrgc10-Nov-06 3:55
ednrgc10-Nov-06 3:55 
QuestionWebparts Pin
smruti_ranjan9-Nov-06 19:47
smruti_ranjan9-Nov-06 19:47 
AnswerRe: Webparts Pin
Parwej Ahamad10-Nov-06 6:10
professionalParwej Ahamad10-Nov-06 6:10 
Questioni want to show all nodes of breadcrumb on each page Pin
sushantsprajan9-Nov-06 19:45
sushantsprajan9-Nov-06 19:45 
AnswerRe: i want to show all nodes of breadcrumb on each page Pin
eggsovereasy10-Nov-06 3:39
eggsovereasy10-Nov-06 3:39 
Questionit don't fire session_end event when session timed out Pin
vurugonda9-Nov-06 19:37
vurugonda9-Nov-06 19:37 
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 

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.