KENTICO AND ACTIVE DIRECTORY WITH SERVER IIS

alzo alzo asked on June 5, 2017 22:15

Hello I followed your advice but still I am blocked: In iis i did this:

  • Select your site's application pool
  • Select Advanced Settings on the right-hand side On the Advanced Settings pop-up window, scroll down to the Process Model group
  • Change the first option called Identity to NetworkService (mine was set to the default ApplicationPoolIdentity).

My function is:

public bool DoesUserExist(string userName) { using (var domainContext = new PrincipalContext(ContextType.Domain, "severxxxxxxxxxxxxxx")) { using (var foundUser = UserPrincipal.FindByIdentity(domainContext, IdentityType.SamAccountName, userName)) { return foundUser != null; } } }

My ERROR:

An operations error occurred. 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.DirectoryServices.DirectoryServicesCOMException: An operations error occurred.

Line 44: using (var domainContext = new PrincipalContext(ContextType.Domain, "SERVRXXXXXXXX")) Line 45: { Line 46: using (var foundUser = UserPrincipal.FindByIdentity(domainContext, IdentityType.SamAccountName, userName))

help me

Recent Answers


Brenden Kehren answered on June 5, 2017 22:33

Have you debugged through your code at all? What is the rest of the error? Did you check the rest of the Kentico logs? Server logs? AD logs? Might start there and see what you can come up with. If this code is NOT custom code, meaning Kentico out of the box code or webparts, then I'd suggest contacting Kentico Support directly.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.