Friday, October 9, 2009

Workflow Issue & Solution

The solution for the workflow issue mentioned at the end is as as follows
  1. Remove the existing strong name key file from the workflow assembly code.
  2. Add a new strong name key file.
  3. Compile the workflow assembly.
  4. Register the workflow assembly in database mode.
  5. Restart the CRM async service
ErrorCode - 2147201001

Workflow paused due to error: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.Workflow.Runtime.Hosting.DefaultWorkflowLoaderService.CreateInstance(Type workflowType) at System.Workflow.Runtime.WorkflowDefinitionDispenser.LoadRootActivity(Type workflowType, Boolean createDefinition, Boolean initForRuntime) at System.Workflow.Runtime.WorkflowDefinitionDispenser.GetRootActivity(Type workflowType, Boolean createNew, Boolean initForRuntime) at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance) at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationContext context, WorkflowInstance workflowInstance) at System.Workflow.Runtime.WorkflowRuntime.GetWorkflowExecutor(Guid instanceId, CreationContext context) at System.Workflow.Runtime.WorkflowRuntime.InternalCreateWorkflow(CreationContext context, Guid instanceId) at System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(Type workflowType, Dictionary`2 namedArgumentValues, Guid instanceId) at Microsoft.Crm.Workflow.WorkflowHost.StartWorkflowFromType(Guid instanceId, Type workflowType, WorkflowContext context) Inner Exception: System.TypeLoadException: Could not load type 'M.C.Workflow.StartChildWorkflow' from assembly 'M.C.Workflow.SubscriptionWorkflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=99c841002e45ae51'. at Compiled.Workflow9073d7dbc4b4de11818d0800279388db.InitializeComponent() at Compiled.Workflow9073d7dbc4b4de11818d0800279388db..ctor()

1 comment:

  1. Happy to know about your second technical blog! Now its a race between your two blogs and lets see who wins! Happy blogging!

    ReplyDelete