Symptoms
In the SharePoint Worklist Webpart shows the following error:
Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type SourceCode.Workflow.TaskList.WebPart.TaskListWebPartFactory, SourceCode.Workflow.TaskList, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d could not be found or it is not registered as safe. Correlation ID: 1345019d-dd7a-20e5-e0a4-4bd4abd9ae44.
Diagnoses
This seems to be related to the way the SharePoint site is hosting or referencing the webpart's underlying files.
Resolution
This issue can be resolved by adding the following items to the web.config file (on all WFE's) for the SharePoint site that was hosting the page with the webpart:
-Back up the web.config file for the SharePoint site
-Added in the <SafeControls> section:
<SafeControl Assembly="SourceCode.Workflow.TaskList, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" Namespace="SourceCode.Workflow.TaskList.WebPart" TypeName="*" Safe="True" />
<SafeControl Assembly="SourceCode.SharePoint.WebPart.Reporting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3a044eb998e657b6" Namespace="SourceCode.SharePoint.WebPart.Reporting.ProcessGraph" TypeName="*" Safe="True" /> <SafeControl Assembly="SourceCode.SharePoint.WebPart.Reporting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3a044eb998e657b6" Namespace="SourceCode.SharePoint.WebPart.Reporting.IntervalGraph" TypeName="*" Safe="True" /> <SafeControl Assembly="SourceCode.SharePoint.WebPart.Reporting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3a044eb998e657b6" Namespace="SourceCode.SharePoint.WebPart.Reporting.ActivityGraph" TypeName="*" Safe="True" /> <SafeControl Assembly="SourceCode.SharePoint.WebPart.Reporting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3a044eb998e657b6" Namespace="SourceCode.SharePoint.WebPart.Reporting.MyProcesses" TypeName="*" Safe="True" /> <SafeControl Assembly="SourceCode.SharePoint.Forms.WebParts, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" Namespace="SourceCode.SharePoint.Forms.WebParts" TypeName="*" Safe="True" />
-Save the web.config file
-Do an IIS reset on the WFE box for good measure then re-browse the site. You will see the webpart load successfully.
Do these steps for all SharePoint Web Front Ends in the farm.