G
Guest
I know that I have posted this question before, but it is still unresolved
and I don't know where to turn to next.
I have code that is creating a user (works fine), then sets the account
flags (works fine) and then sets the password (fails).
Here is the pertinent information:
Ex.InnerException.Message: Logon failure: unknown user name or bad password.
Ex.Message: Exception has been thrown by the target of an invocation.
Stack Trace:
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target,
Object[] args, Boolean[] byrefModifiers, Int32 culture, String[]
namedParameters)\r\n
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target,
Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters)\r\n
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target,
Object[] args)\r\n at
System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[]
args)\r\n
at Project.FormName.ChangeUserPassword(String szUsername) in
c:\\inetpub\\wwwroot\\Project\\secure\\usercreation.aspx.cs:line 254"
When I create the DirectoryEntry (code below):
DirectoryEntry entry = new DirectoryEntry(
"LDAP://dc.domain.local/CN=" + szUsername + ",OU=MyUsers,DC=domain,DC=local",
szAdminAccount + "@domain.local",
szAdminPwd,
AuthenticationTypes.Secure | AuthenticationTypes.ServerBind);
This is a WebApp that is running on Win2k3 Server IIS 6.
I have logged on with the account and password supplied and that works
fine and the account can change the password.
Any thoughts would be appreciated.
and I don't know where to turn to next.
I have code that is creating a user (works fine), then sets the account
flags (works fine) and then sets the password (fails).
Here is the pertinent information:
Ex.InnerException.Message: Logon failure: unknown user name or bad password.
Ex.Message: Exception has been thrown by the target of an invocation.
Stack Trace:
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target,
Object[] args, Boolean[] byrefModifiers, Int32 culture, String[]
namedParameters)\r\n
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target,
Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters)\r\n
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target,
Object[] args)\r\n at
System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[]
args)\r\n
at Project.FormName.ChangeUserPassword(String szUsername) in
c:\\inetpub\\wwwroot\\Project\\secure\\usercreation.aspx.cs:line 254"
When I create the DirectoryEntry (code below):
DirectoryEntry entry = new DirectoryEntry(
"LDAP://dc.domain.local/CN=" + szUsername + ",OU=MyUsers,DC=domain,DC=local",
szAdminAccount + "@domain.local",
szAdminPwd,
AuthenticationTypes.Secure | AuthenticationTypes.ServerBind);
This is a WebApp that is running on Win2k3 Server IIS 6.
I have logged on with the account and password supplied and that works
fine and the account can change the password.
Any thoughts would be appreciated.