We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

AD Domain setup when using SOUser.CanChangePassword in development

Hi folks,

 

We have no problem with using SOUser managment on development machine configured and used within company AD/LDAP domain. With correct configuration in application config the SOUser methods change information on development machine server (or in production server).

However as soon as I move test implementation to staging machine with copy of local, sandboxed AD domain/LDAP we have problem with using SOUser methods as it starts to throws errors.

For example as soon as I check for `CanChangeCredentials` the underlying SO code throws exception related to AD Domain server configuration:

The specified domain either does not exist or could not be contacted.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.PropertyValueCollection.PopulateList()
   at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entr
y, String propertyName)
   at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirector
yInitNoContainer()
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()

   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
   at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()

   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTyp
eHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, S
tring identityValue, DateTime refDate)
   at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTyp
e(PrincipalContext context, Type principalType, IdentityType identityType, Strin
g identityValue)
   at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(Pr
incipalContext context, IdentityType identityType, String identityValue)
   at SuperOffice.CRM.Administration.ActiveDirectoryCredentialPlugin.CanChangePa
ssword(CredentialsRow row) in c:\Builds\N1\Seven\Rel80_C\Sources\Server\Source\S
oDataBase\CRM\Administration\ActiveDirectoryCredentialPlugin.cs:line 502
   at SuperOffice.CRM.Administration.SoUser.get_CanChangePassword() in c:\Builds
\N1\Seven\Rel80_C\Sources\Server\Source\SoDataBase\CRM\Administration\User.cs:li
ne 997

 I assume that is something related to AD domain configuration on staging machine and we are missing something important. Does anyone know what important configuration settings should be changed to make that code works on staging machine so I could talk with internal ID folks? Sould the process that starts application use local domain credentials?

thanks,
Piotr 

Ingen svar så langt