Close this search box.

Resolving SharePoint Workflow Publish Error

Errors were found when compiling the workflow. The workflow files were saved but cannot be run.

Advanced: Unexpected error on server associating the workflow

This is a SharePoint 2010 SP1 Bug and Error message is not meaningful to solve it or why this error is occurring Sad smile.

I found and faced a stupid SPD workflow publish Error during Last SP Deployment in Pre-Production & Production Server in Client End. I google it and found many people got the following Error “Error were found when compiling the workflow”.

There are several solutions with several replies in forum which confused me to solve the problem and Some solutions worked for my pre-Production Server but Doesn’t work for Production Environment. Production Environment were fixed after doing some additional steps. That’s why, I Planned to write a post on this error to help people who might face similar error.

So,  Let me explain you my scenario first and how to solved this problem step by step.


My Team developed a SPD Workflow which is running fine in the Development Environment (SharePoint Server 2010 RTM – Build Version 14.0.4762.1000) without any error.  When I tried to Deployed in Pre-Production Environment (SharePoint Server 2010 SP1 – Build Version 14.0.6029.1000), I was unable to Restore site due to Upper Version.

I upgraded the development Environment to 14.0.6029.1000 as same as Pre-Production and Restored the SharePoint Site in Pre-Production.

But Workflow Failed to Start

So when I tried to Publish workflow again using SharePoint Designer, I got the above error even from Development Server. It Means this is SP1 Bug for this specific version.


To resolve this issue, install the hotfixes that are provided in the following articles in the Microsoft Knowledge Base:

2687614 ( )

Description of the SharePoint Server 2010 hotfix package (Coreservermui-xx-xx.msp): October 30, 2012

2687557 ( )

Description of the SharePoint Foundation 2010 hotfix package (Wss-x-none.msp): October 30, 2012

I installed those in the Pre-Production Server and Update my Farm. Each time I run “SharePoint 2010 Products Configuration Wizard” to Update Farm (It is required to Update Farm who doesn’t know about it)

Error still not solved !!!

Finally I did the following:

Open SharePoint management shell as administrator and run the bellow command

$app = get-spwebapplication
$app.UserDefinedWorkflowMaximumComplexity = 10000

Then I try to publish the workflow and it works without any problem.

I found Details at

Final Steps:

The above solution doesn’t work in the Production and confused what to do.

Possible reason(s) I realized its something to do with SPD to Web Application communication. So I guess it was request size / timeout related issue.

Finally, I increased the web application execution time to Solve this Problem

1. Navigate to web.config file of the WebApplication
Usually its

@ C:\inetpub\wwwroot\wss\VirtualDirectories\xxxx\web.config

2. Look for this

<httpRuntime maxRequestLength=”51200″ />

3. Replace with

<httpRuntime maxRequestLength=”51200″ executionTimeout=”300″ />

That’s all.


This article is part of the GWB Archives. Original Author: Technical Speaking

Related Posts