locked
Async service keep stopping with Specified cast is not valid RRS feed

  • Question

  • Hi there,

    Our organization currently is experiencing some failure on CRM 4.0 Async service.

    The error message is :

    failed while monitoring asynchronous operations queue. Exception: System.InvalidCastException: Specified cast is not valid.
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.GetSdkBaseUrl()
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.get_WebServiceEndpoint()
       at Microsoft.Crm.Asynchronous.CrmServiceFactory.CreateCrmService(Guid organizationId, Nullable`1 userId, CorrelationToken correlationToken)
       at Microsoft.Crm.Asynchronous.SdkPluginDescriptionProvider.GetPluginTypeDescription(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmSharedMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCache.LookupEntry(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.GetPluginType(Guid pluginTypeId)
       at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.ProcessAsyncEvent(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.InvokeHandlerInPool(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    It looks the GetSdkBaseUrl() function failed. Has anyone experienced it before?

    Cheers

    Monday, April 13, 2015 10:02 AM

All replies

  • I don't know about your specific error, but the CRM 4.0 Async service was notoriously unstable.  That's why they added a monitoring service in later versions to keep it up.  However, for 4.0, I recommend going to the Service itself in the Windows Service area, and then tell the "behavior after failure" section to "Restart" every time it fails.  While not perfect, it will keep your Async service up and running even when it crashes.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Monday, April 13, 2015 1:36 PM