Answered by:
CRM 4.0: PlugIn Registration Error - FindResultInDC Thread was being aborted

Question
-
I'm trying to register Plug-ins on freshly installed CRM organization, but getting an error saying "Timeout Expired". When I run the trace I'm getting an error with stack trace given below. Any help would be highly appreciated.
at SystemUserService.FindResultInDC(DomainControllerCollection dcCol, String accountName)
at SystemUserService.GetCaseSafeName(String domain, String accountName)
at SystemUserService.TryCheckPrivilege(PrivilegeOnPremise privilege, String systemUserName)
at SdkEntityServiceBase.ValidateOperationForCurrentSku(String operationName, ExecutionContext context)
at SdkEntityServiceBase.CreateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifySku)
at PluginTypeServiceInternal`1.Create(IBusinessEntity entity, ExecutionContext context)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at InternalOperationPlugin.Execute(IPluginExecutionContext context)
at PluginStep.Execute(PipelineExecutionContext context)
at Pipeline.Execute(PipelineExecutionContext context)
at MessageProcessor.Execute(PipelineExecutionContext context)
at InternalMessageDispatcher.Execute(PipelineExecutionContext context)
at ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at CrmServiceInternal.Create(String namespaceName, BusinessEntityBase entity, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)
at CrmService.Create(BusinessEntity entity)
at RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at LogicalMethodInfo.Invoke(Object target, Object[] values)
at WebServiceHandler.Invoke()
at WebServiceHandler.CoreProcessRequest()
at SyncSessionlessHandler.ProcessRequest(HttpContext context)
at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at ApplicationStepManager.ResumeSteps(Exception error)
at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
>ThreadAbort Exception in FindResultInDC Thread was being aborted.
2.
Unhandled Exception: System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at PluginRegistrationTool.CrmSdk.CrmService.Delete(String entityName, Guid id)
at PluginRegistrationTool.RegistrationHelper.UnRegister(CrmOrganization org, Boolean cascadeOperation, ProgressIndicator prog, ICrmEntity[] crmEntity)
at PluginRegistrationTool.OrganizationControl.toolUnregister_Click(Object sender, EventArgs e)
Tuesday, August 23, 2011 11:37 AM
Answers
-
I don't think it's a security issue. It sounds like your best course of action is to get the name of a known, working Domain Controller in the domain that the CRM Server's in, and force CRM to use that domain controller, which I expect would solve the problem. You can do this following the steps in this KB article
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk- Marked as answer by CRM Junky Wednesday, August 24, 2011 4:50 AM
Tuesday, August 23, 2011 4:55 PMModerator
All replies
-
It looks like the code is trying to communicate with a domain controller, and failing. I'd check if your domain controllers are working and available.
I think the reason CRM communicates with a domain controller when registering a plugin is because you need to be a deployment administrator to register plugins, and this is subject to a separate security model from the CRM security roles (which are managed solely through data in the MSCRM database)
Microsoft CRM MVP - http://mscrmuk.blogspot.com http://www.excitation.co.ukTuesday, August 23, 2011 1:18 PMModerator -
Thanks for your response. I've made sure that the user I'm using is the only user in CRM and is System Administrator/Deployment Administrator/sysadmin on DB Server. Coming to domain controller, can you please help me understand how can I check if domain controller is working? My customer has forest of domain and has created OU for CRM. I've made sure that I've Read/Write access on that particular OU. Is there anything else that I need to be looking for?Tuesday, August 23, 2011 2:07 PM
-
I don't think it's a security issue. It sounds like your best course of action is to get the name of a known, working Domain Controller in the domain that the CRM Server's in, and force CRM to use that domain controller, which I expect would solve the problem. You can do this following the steps in this KB article
Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk- Marked as answer by CRM Junky Wednesday, August 24, 2011 4:50 AM
Tuesday, August 23, 2011 4:55 PMModerator -
Thanks David. The KB article helped us resolve the issue. We have created a StringValue entry in registry with name PreferredDc and set the value as closest domain controller name. We can find closest domain controller using command line script below
nltest /dsgetdc: <your domain name>
Thanks for your help
Wednesday, August 24, 2011 4:50 AM