T
tpeltz
We have a website that we are trying to control access to using the
ActiveDirectoryMembershipProvider. In the webconfig we have specified
a ConnectionString that includes a port number.
LDAP://acme.local.com:50001/CN=Users,DC=local,DC=com"
Our membership properties are as follows.
<membership defaultProvider="MembershipADProvider">
<providers>
<add connectionStringName="ADConnectionString"
connectionUsername="CN=Admin,CN=Users,DC=local,DC=com"
connectionPassword="np4dev'sio" connectionProtection="Secure"
requiresUniqueEmail="false"
minRequiredNonalphanumericCharacters="0"
enableSearchMethods="true"
passwordStrengthRegularExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)
^([a-zA-Z0-9]{7,})$"
minRequiredPasswordLength="7"
name="MembershipADProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
We are able to logon successfully with accounts stored on our remote
AD LDS server. We would like to allow users to change their password
and have configured a change password page with a ChangePassword
control. When we try to change the password while logged on as a user
we get the following stack trace.
[DirectoryServicesCOMException (0x80072030): There is no such object
on the server.
]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
+377678
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
System.DirectoryServices.DirectoryEntry.get_Options() +31
System.Web.Security.ActiveDirectoryMembershipProvider.SetPasswordPortIfApplicable
(DirectoryEntry userEntry) +297
System.Web.Security.ActiveDirectoryMembershipProvider.ChangePassword
(String username, String oldPassword, String newPassword) +1945
System.Web.Security.MembershipUser.ChangePassword(String
oldPassword, String newPassword) +129
System.Web.Security.MembershipUser.ChangePassword(String
oldPassword, String newPassword, Boolean throwOnError) +43
System.Web.UI.WebControls.ChangePassword.AttemptChangePassword()
+162
System.Web.UI.WebControls.ChangePassword.OnBubbleEvent(Object
source, EventArgs e) +114
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +166
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+36
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1565
First, does anyone know what might cause this? Second, I notice that
it calls SetPasswordPortIfApplicable. I can't find any documentation
on this method of ActiveDirectoryMembershipProvider. We are using an
alternate port (50001). When we created the accounts using
DirectoryServices it was necessary to tell the provider what port we
were using with the following command.
user.Invoke("SetOption",
(ADS_OPTION_PASSWORD_PORTNUMBER), IntPort)
user.Invoke("SetPassword", str)
I don't see a way of telling the changepassword control which port to
use. Could this be the reason for our problems?
Thanks for you insight.
ActiveDirectoryMembershipProvider. In the webconfig we have specified
a ConnectionString that includes a port number.
LDAP://acme.local.com:50001/CN=Users,DC=local,DC=com"
Our membership properties are as follows.
<membership defaultProvider="MembershipADProvider">
<providers>
<add connectionStringName="ADConnectionString"
connectionUsername="CN=Admin,CN=Users,DC=local,DC=com"
connectionPassword="np4dev'sio" connectionProtection="Secure"
requiresUniqueEmail="false"
minRequiredNonalphanumericCharacters="0"
enableSearchMethods="true"
passwordStrengthRegularExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)
^([a-zA-Z0-9]{7,})$"
minRequiredPasswordLength="7"
name="MembershipADProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
We are able to logon successfully with accounts stored on our remote
AD LDS server. We would like to allow users to change their password
and have configured a change password page with a ChangePassword
control. When we try to change the password while logged on as a user
we get the following stack trace.
[DirectoryServicesCOMException (0x80072030): There is no such object
on the server.
]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
+377678
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
System.DirectoryServices.DirectoryEntry.get_Options() +31
System.Web.Security.ActiveDirectoryMembershipProvider.SetPasswordPortIfApplicable
(DirectoryEntry userEntry) +297
System.Web.Security.ActiveDirectoryMembershipProvider.ChangePassword
(String username, String oldPassword, String newPassword) +1945
System.Web.Security.MembershipUser.ChangePassword(String
oldPassword, String newPassword) +129
System.Web.Security.MembershipUser.ChangePassword(String
oldPassword, String newPassword, Boolean throwOnError) +43
System.Web.UI.WebControls.ChangePassword.AttemptChangePassword()
+162
System.Web.UI.WebControls.ChangePassword.OnBubbleEvent(Object
source, EventArgs e) +114
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +37
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +166
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+36
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1565
First, does anyone know what might cause this? Second, I notice that
it calls SetPasswordPortIfApplicable. I can't find any documentation
on this method of ActiveDirectoryMembershipProvider. We are using an
alternate port (50001). When we created the accounts using
DirectoryServices it was necessary to tell the provider what port we
were using with the following command.
user.Invoke("SetOption",
(ADS_OPTION_PASSWORD_PORTNUMBER), IntPort)
user.Invoke("SetPassword", str)
I don't see a way of telling the changepassword control which port to
use. Could this be the reason for our problems?
Thanks for you insight.