Designer workflow failed on start when item is added
Jun 16, 2010

I recently got stuck with one of the strange trouble with a developer. He reported that if he adds a workflow on a list created from SharePoint designer to run automatically when the item is added on list he can not use his code written in one of his asp.net user control to add item into that list. The issue happens is that workflow ends up with message “Failed on start”

First instance i suspected security trouble and tried running entire code with elevated permissions but no luck.

After looking at the log SharePoint was logging “The root activity type is invalid”.

The solution found for this trouble is really simple. Adding following configuration in web.config of our asp.net solution resolved the problem.

 <configSections>
 <sectionGroup name="System.Workflow.ComponentModel.WorkflowCompiler" type="System.Workflow.ComponentModel.Compiler.WorkflowCompilerConfigurationSectionGroup, System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
 <section name="authorizedTypes" type="System.Workflow.ComponentModel.Compiler.AuthorizedTypesSectionHandler, System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
 </sectionGroup>
 </configSections>
 <System.Workflow.ComponentModel.WorkflowCompiler>
 <authorizedTypes>
 <authorizedType Assembly="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" />
 <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowActivationProperties" Authorized="True" />
 <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowTaskProperties" Authorized="True" />
 <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowHistoryEventType" Authorized="True" />
 <authorizedType Assembly="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WorkflowActions" TypeName="*" Authorized="True" />
 </authorizedTypes>
 </System.Workflow.ComponentModel.WorkflowCompiler>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Related Posts

Changing the language of an existing SharePoint site

Recently, I had a problem with an existing SharePoint site. The problem was…

Dec 26, 2008

How to add master page with styles and images in site definition

There is often a requirement to add customized master page (with images and…

May 16, 2009

FIX: Setting the sharepoint regional settings and saving date values

Generally we are saving the date values by “DateTime.Now.ToString()” for the SharePoint list…

Jan 9, 2009
Top

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.