Hi,
We are facing a strange error while accessing CRM, its version 4.0 (On Premise). The Async Service is not getting started. We can't access it using IP address or from localhost from server. Any ideas???
The error when you try to access CRM URL is:
Host {PateformServerName:Port}: failed while monitoring asynchronous operations queue. Exception: System.NullReferenceException: Object reference not set to an instance of an object.at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.AddEnumOptionsToCollection(IPreloadedMetadataInitializationProducerContext context)
at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.Initialize(Guid organizationId, MetadataContainer container)
at Microsoft.Crm.Metadata.MultiOrgSharableMetadataCacheLoader.CreateMetadataCacheDataProvider(MetadataContainer container, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.BuildMetadataCacheFromMetadataContainer(MetadataContainer container, LoadMasks masks, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.BuildMetadataCacheFromDataSet(DataSet data, LoadMasks masks, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, IOrganizationContext context)
at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)
at Microsoft.Crm.Asynchronous.QueueDataAccess.GetEntityLogicalNameFromObjectTypeCode(Int32 objectTypeCode)
at Microsoft.Crm.Asynchronous.QueueDataAccess.GetLookup(Object objectId, String objectIdName, Int32 objectDsc, Int32 objectTypeCode)
at Microsoft.Crm.Asynchronous.QueueDataAccess.<>c__DisplayClass2.<SelectEvents>b__0(Object[] values)
at Microsoft.Crm.Asynchronous.DataAccessBase.ExecuteSqlCommandAndProcessRecords(IDbCommand command, RecordProcessor recordProcessor)
at Microsoft.Crm.Asynchronous.QueueDataAccess.SelectEvents(Int32 numberOfEvents)
at Microsoft.Crm.Asynchronous.QueueManager.OnSelectPerOrganization(IOrganizationConfiguration orgConfig, Int32 orgCapacity)
at Microsoft.Crm.Asynchronous.QueueManager.WorkloadThrottler.HandleActiveOrganization(Int32 capacityPerPriority, WorkloadThrottlingInformation orgPollingInfo, Int32 effectiveMinimumPriority)
at Microsoft.Crm.Asynchronous.QueueManager.WorkloadThrottler.Execute(Int32 totalCapacity)
at Microsoft.Crm.Asynchronous.QueueManager.OnSelectTimerEvent(Object sender, ElapsedEventArgs e)
at Microsoft.Crm.Asynchronous.Timer.TimerProcessor.ExecuteTimers(Object data)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
Here is what we found in trace log:
>SET TRANSACTION ISOLATION LEVEL READ COMMITTED[2013-02-20 23:59:34.5] Process: w3wp |Organization:94460803-2799-df11-a1fd-0050568d426c |Thread: 27 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose | ExecutionContext.OnErrorRequest
at ExecutionContext.OnErrorRequest()
at ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
at BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo)
at SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId)
at CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId)
at BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
at CrmWindowsIdentity.RecognizeCrmUser(Guid organizationId, Guid callerId)
at AuthenticationProvider.Authenticate(CrmAuthenticationToken token)
at SoapHeaderAuthenticationProviderBase.Authenticate(HttpApplication application)
at AuthenticationStep.Authenticate(HttpApplication application)
at AuthenticationPipeline.Authenticate(HttpApplication application)
at AuthenticationEngine.Execute(Object sender, EventArgs e)
at SyncEventExecutionStep.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)
>ExecutionContext not in use (OnErrorRequest) for organization {94460803-2799-DF11-A1FD-0050568D426C}
[2013-02-20 23:59:34.5] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Platform.Sdk |User: 00000000-0000-0000-0000-000000000000 |Level: Warning | SoapHeaderAuthenticationProviderBase.Authenticate
at SoapHeaderAuthenticationProviderBase.Authenticate(HttpApplication application)
at AuthenticationStep.Authenticate(HttpApplication application)
at AuthenticationPipeline.Authenticate(HttpApplication application)
at AuthenticationEngine.Execute(Object sender, EventArgs e)
at SyncEventExecutionStep.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)
>AUTH: MultipleOrganizationSoapHeaderAuthenticationProvider reject request http://{plateform server name}/MSCRMServices/2007/CrmService.asmx because System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.AddEnumOptionsToCollection(IPreloadedMetadataInitializationProducerContext context)
at Microsoft.Crm.Metadata.PreloadedMetadataCacheDataProvider.Initialize(Guid organizationId, MetadataContainer container)
at Microsoft.Crm.Metadata.MultiOrgSharableMetadataCacheLoader.CreateMetadataCacheDataProvider(MetadataContainer container, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.BuildMetadataCacheFromMetadataContainer(MetadataContainer container, LoadMasks masks, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.BuildMetadataCacheFromDataSet(DataSet data, LoadMasks masks, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabaseInternal(LoadMasks masks, CrmDbConnection connection, CrmTransaction transaction, Guid organizationId)
at Microsoft.Crm.Metadata.DynamicMetadataCacheLoader.LoadCacheFromDatabase(LoadMasks masks, IOrganizationContext context)
at Microsoft.Crm.Metadata.DynamicMetadataCacheFactory.LoadMetadataCache(LoadMethod method, CacheType type, IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataCache.LoadCache(IOrganizationContext context)
at Microsoft.Crm.Metadata.MetadataCache.GetInstance(IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.BusinessEntityMoniker..ctor(Guid id, String entityName, Guid organizationId)
at Microsoft.Crm.Caching.UserDataCacheLoader.LoadCacheData(Guid key, ExecutionContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.BasicCrmCache`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId)
at Microsoft.Crm.Authentication.CrmWindowsIdentity.DoRecognizeUser(String userToken, Guid organizationId)
at Microsoft.Crm.Authentication.BaseCrmIdentity.RecognizeCrmUser(Guid organizationId)
at Microsoft.Crm.Authentication.CrmWindowsIdentity.RecognizeCrmUser(Guid organizationId, Guid callerId)
at Microsoft.Crm.WebServices.AuthenticationProvider.Authenticate(CrmAuthenticationToken token)
at Microsoft.Crm.WebServices.SoapHeaderAuthenticationProviderBase.Authenticate(HttpApplication application).
[2013-02-20 23:59:34.5] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info | SoapHeaderAuthenticationProviderBase.Authenticate
at SoapHeaderAuthenticationProviderBase.Authenticate(HttpApplication application)
at AuthenticationStep.Authenticate(HttpApplication application)
at AuthenticationPipeline.Authenticate(HttpApplication application)
at AuthenticationEngine.Execute(Object sender, EventArgs e)
at SyncEventExecutionStep.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)
>AUTH: Authentication provider Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider rejects request.
[2013-02-20 23:59:34.5] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 27 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info | AuthenticationPipeline.Authenticate
at AuthenticationPipeline.Authenticate(HttpApplication application)
at AuthenticationEngine.Execute(Object sender, EventArgs e)
at SyncEventExecutionStep.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)
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" Thanks, Imran Abbasi