SharePoint Workflow error


Tech Trek – 2017 February

PROBLEM:
User encounters a runtime error when initiating workflows, i.e. nothing happens or failure occurs when attempting to transfer files (via OfficialFile.asmx Web service). Re-executing the workflow would result into the expected behavior.

ROOT CAUSE:
The issue typically happens after a SharePoint upgrade or patch has been applied. As this affects only a certain component, this behavior may not be apparent after the update.

RESOLUTION:

  1. Open SharePoint LOGS folder and check the affected log file at the time the event occurred to see if the following Unexpected error is present:
    <Error>
    <CompilerError Line=”0″ Column=”0″
    Text=”Type Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties,
    Microsoft.SharePoint,
    Version=15.0.0.0,
    Culture=neutral,
    PublicKeyToken=71e9bce111e9429c is not marked as authorized in the application configuration file.” />
    </Error>
  2. Compare entry differences of the most recent web_<date/time>.BAK using a text comparison tool like WinMerge or WinDiff.
  3. Open web.config in the Web Front-end server at the following location and add/correct the affected component.
    C:\inetpub\wwwroot\wss\VirtualDirectories\<port number><System.Workflow.ComponentModel.WorkflowCompiler>
    <authorizedTypes>
    <targetFx version=”v4.0″>

    <authorizedType Assembly=”Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.SharePoint.Workflow” TypeName=”SPWorkflowTaskProperties” Authorized=”True” />
    </targetFx>
    </authorizedTypes>
    </System.Workflow.ComponentModel.WorkflowCompiler>
  4. Perform an iisreset.

I’ve highlighted Version=15.0.0.0 since usually this entry reverts back to 14.0.0.0 in the SharePoint web.config file which causes the unauthorized issue.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s