Click here to Skip to main content
16,011,475 members
Home / Discussions / C#
   

C#

 
GeneralXmlValidatingReader Pin
Not Active11-Aug-04 3:59
mentorNot Active11-Aug-04 3:59 
GeneralRe: XmlValidatingReader Pin
VenkatFor.NET11-Aug-04 7:28
VenkatFor.NET11-Aug-04 7:28 
GeneralRe: XmlValidatingReader Pin
Not Active12-Aug-04 3:57
mentorNot Active12-Aug-04 3:57 
QuestionDo you see the same results??? Pin
LongRange.Shooter11-Aug-04 3:13
LongRange.Shooter11-Aug-04 3:13 
AnswerRe: Do you see the same results??? Pin
Nick Parker11-Aug-04 4:16
protectorNick Parker11-Aug-04 4:16 
GeneralRe: Do you see the same results??? Pin
LongRange.Shooter11-Aug-04 5:43
LongRange.Shooter11-Aug-04 5:43 
GeneralDirectX Pin
rafQ11-Aug-04 2:29
rafQ11-Aug-04 2:29 
GeneralUrgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 2:24
shambho11-Aug-04 2:24 
I have a very typical problem. I am trying to create a user in activedirectory running in windows 2003 server. i am able to create user but when coming to setting password its not working.
the code :

String strPath = "LDAP://192.168.0.101:389/OU=100001,DC=Tserver,DC=local";
try
{
DirectoryEntry user = new DirectoryEntry(strPath, @"Tserver.local\administrator", "password", AuthenticationTypes.Secure | AuthenticationTypes.Sealing |AuthenticationTypes.ServerBind );
//create user
DirectoryEntry user = entry.Children.Add("cn=Test User", "user");
user.Properties["sAMAccountName"].Add("testuser");
user.Properties["sn"].Add("User");
user.Properties["givenName"].Add("Test");
user.Properties["description"].Add("Test account added with code.");
user.CommitChanges();
// User has to be saved prior to this step
user.Invoke("SetPassword", new string[] {"password1"} );
user.CommitChanges();
user.Close();
user.Dispose();
}
catch (Exception exx)
{
Response.Write("Exception: "+ exx.ToString() + " \n");
return;
}
Response.Write("Success: Password set.");


Error Description:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: The network path was not found.

Source Error:

Line 127:
Line 128: // User has to be saved prior to this step
Line 129: user.Invoke("SetPassword", new string[] {"princeton"} );
Line 130: user.Properties["userAccountControl"].Value = 0x200;
Line 131: user.CommitChanges();


Source File: c:\inetpub\wwwroot\adminlogin\pages\information.aspx.cs Line: 129


Stack Trace:

[FileNotFoundException: The network path was not found.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473
System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) +29
System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)
AdminLogin.Information.btnSave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\adminlogin\pages\information.aspx.cs:129
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()





I am looking for some help to solve this problem

I think this explains the problem well? Thank you in advance.

shambho Mahadeva



hap
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
LongRange.Shooter11-Aug-04 3:22
LongRange.Shooter11-Aug-04 3:22 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 18:21
shambho11-Aug-04 18:21 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
Nick Parker11-Aug-04 3:42
protectorNick Parker11-Aug-04 3:42 
GeneralRe: Urgent Regarding Directoryentry.Invoke(Setpassword,"") method Pin
shambho11-Aug-04 18:31
shambho11-Aug-04 18:31 
GeneralCommit a Outllook Message automatically using the user32.dll - Problems with the right wNotifiyCode Pin
Member 7812311-Aug-04 1:51
Member 7812311-Aug-04 1:51 
GeneralDataBase Problem Pin
ahegeg@hotmail.com11-Aug-04 1:47
sussahegeg@hotmail.com11-Aug-04 1:47 
GeneralRe: DataBase Problem Pin
VenkatFor.NET11-Aug-04 7:07
VenkatFor.NET11-Aug-04 7:07 
GeneralProblem verifying a signed XML document Pin
pelos11-Aug-04 1:15
pelos11-Aug-04 1:15 
GeneralJodoveepn article printing controls on a form Pin
robmays11-Aug-04 1:07
robmays11-Aug-04 1:07 
QuestionHow to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 0:20
sachinkalse11-Aug-04 0:20 
AnswerRe: How to access the object associated with tree nodes tag property? Pin
Nick Parker11-Aug-04 2:59
protectorNick Parker11-Aug-04 2:59 
GeneralRe: How to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 14:55
sachinkalse11-Aug-04 14:55 
GeneralRe: How to access the object associated with tree nodes tag property? Pin
sachinkalse11-Aug-04 16:30
sachinkalse11-Aug-04 16:30 
GeneralPointers,Classes,Objects... II Pin
Tambi Ashmoz11-Aug-04 0:15
Tambi Ashmoz11-Aug-04 0:15 
GeneralRe: Pointers,Classes,Objects... II Pin
Werdna11-Aug-04 13:45
Werdna11-Aug-04 13:45 
GeneralRe: Pointers,Classes,Objects... II Pin
Tambi Ashmoz11-Aug-04 18:54
Tambi Ashmoz11-Aug-04 18:54 
GeneralRe: Pointers,Classes,Objects... II Pin
Werdna12-Aug-04 2:26
Werdna12-Aug-04 2:26 

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.