0

我们将 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] 进程:w3wp |组织:---- |线程:9 |类别:Platform.Sdk |用户:---- |级别:错误 | CompositeSoapExtensionExceptionHandler.Handle
>CrmSoapExtension 检测到 CrmException:
System.Web.Services.Protocols.SoapException:服务器无法处理请求。---> System.Reflection.TargetInvocationException:调用的目标已抛出异常。---> System.DirectoryServices.DirectoryServicesCOMException (0x80072020):发生操作错误。

   在 System.DirectoryServices.DirectoryEntry.Bind(布尔 throwIfFail)
   在 System.DirectoryServices.DirectoryEntry.Bind()
   在 System.DirectoryServices.DirectoryEntry.get_AdsObject()
   在 System.DirectoryServices.DirectorySearcher.FindAll(布尔 findMoreThanOne)
   在 System.DirectoryServices.DirectorySearcher.FindOne()
   在 Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CheckUserUnderRootPath(字符串 domainAccountName,ExecutionContext 上下文)
   在 Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.CreateInternal(Guid 组织 ID,IBusinessEntity 系统用户,ExecutionContext 上下文)
   在 Microsoft.Crm.ObjectModel.SystemUserServiceInternal`1.Create(IBusinessEntity 系统用户,ExecutionContext 上下文)
   --- 内部异常堆栈跟踪结束 ---
   在 System.RuntimeMethodHandle._InvokeMethodFast(对象目标,Object[] 参数,SignatureStruct& sig,MethodAttributes methodAttributes,RuntimeTypeHandle typeOwner)
   在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object[] 参数,CultureInfo 文化,布尔型 skipVisibilityChecks)
   在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object[] 参数,CultureInfo 文化)
   在 System.Web.Services.Protocols.LogicalMethodInfo.Invoke(对象目标,对象 [] 值)
   在 Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext 上下文)
   在 Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext 上下文)
   在 Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext 上下文)
   在 Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext 上下文)
   在 Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext 上下文)
   在 Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(字符串 messageName、Int32 primaryObjectTypeCode、Int32 secondaryObjectTypeCode、PropertyBag 字段、CorrelationToken correlationToken、CallerOriginToken originToken、UserAuth userAuth、Guid callerId)
   在 Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode、Int32 secondaryObjectTypeCode、CorrelationToken correlationToken、CallerOriginToken originToken、UserAuth userAuth、Guid callerId)
   在 Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken,CallerOriginToken originToken,UserAuth userAuth,Guid callerId)
   在 Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase 请求,CorrelationToken 相关令牌,CallerOriginToken originToken,UserAuth userAuth,Guid callerId)
   在 Microsoft.Crm.Sdk.Crm2007.CrmService.Execute(请求请求)
   --- 内部异常堆栈跟踪结束 ---
4

1 回答 1

1

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

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

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

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

于 2009-10-02T03:23:26.313 回答