29 September 2014

AD module - Reset Password and Port Number


Active Directory Module. This is a nice module to play with. It is quite powerful and quite easy to configure following the documentation provided.

On a recent project we had the situation where we needed to allow the user to change their password. That sounds like the easiest task in the world and somehow whatever we tried we ended up with the following issue:


Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: System.DirectoryServices
   at System.DirectoryServices.DirectoryEntry.Invoke(String methodName, Object[] args)
   at System.Web.Security.ActiveDirectoryMembershipProvider.ChangePassword(String username, String oldPassword, String newPassword)
   at Sitecore.Security.Accounts.MembershipUserWrapper.ChangePassword(String oldPassword, String newPassword)
   at Sitecore.Shell.Applications.Security.SetPassword.SetPasswordPage.OK_Click()

Nested Exception

Exception: System.Runtime.InteropServices.COMException
Message: Configuration information could not be read from the domain controller, either because the machine is unavailable or access has been denied. (Exception from HRESULT: 0x80070547)

This error was logged from the front end but also when trying to change the user password from the Sitecore Desktop Interface. We have tried quite a few things with user permission... nothing work until we added the port number to the connection string:

  < add connectionstring="LDAP://adconnection:389/OU=Users,DC=mycomany,DC=external" name="MyAdConnString"> 

So just in case you are getting similar issues, it is worth adding the port number to the connection string... Hoping that wil save a few hours of debugging...

No comments:

Post a Comment