无法在Dynamics CRM中添加CrmService API用户

时间:2009-10-01 15:02:01

标签: dynamics-crm dynamics-crm-4

我们已将Dynamics CRM 4更新汇总6配置为IFD,并使用部署配置工具设置了UserRootPath。通过CRM界面添加用户非常有效。但是,当尝试通过CrmService API添加用户时,不会添加用户,我们将获得下面包含的跟踪消息。如果我们从组织中删除UserRootPath设置,则通过CrmService API添加用户。路径似乎正确,可在其他LDAP工具中使用,并且用户位于指定的OU中。我们使用路径“LDAP:// dcserver / OU = testorg; OU = Hosting; DC = domain; DC = local”。

[2009-09-29 13:19:54.7] Process: w3wp |Organization:---- |Thread:    9 |Category: Platform.Sdk |User: ---- |Level: Error | CompositeSoapExtensionExceptionHandler.Handle
>CrmSoapExtension detected CrmException:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DirectoryServices.DirectoryServicesCOMException (0x80072020): An operations error occurred.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
   at System.DirectoryServices.DirectorySearcher.FindOne()
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CheckUserUnderRootPath(String domainAccountName, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CreateInternal(Guid organizationId, IBusinessEntity systemuser, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.Create(IBusinessEntity systemuser, ExecutionContext context)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
   at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)
   at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
   at Microsoft.Crm.Sdk.Crm2007.CrmService.Execute(Request request)
   --- End of inner exception stack trace ---

1 个答案:

答案 0 :(得分:1)

0x80072020错误与AD中的通用“拒绝访问”有关。

根据您的配置,您可以尝试通过修改以下内容来查明问题:

1)使用“Active Directory用户和计算机”向应用程序池用户授予“委托”选项。 2)将web.config添加到MSCRMServices文件夹并转换模拟,例如:

< identity impersonate =“true”userName =“mydomain \ bob”password =“builder”/>