A System.BadImageFormatException is Reported by the Workflow 8 Server.

May 10, 2011 | KB: 1012755
Workflow 8

Summary

When the Laserfiche Workflow 8 Server is attempting to execute a workflow, the following error is reported:

    System.BadImageFormatException: The module was expected to contain an assembly manifest.

Cause

In most cases, this exception is encountered if the Workflow Server is attempting to run a custom activity that is invalid. For example, the activity is not .NET-compliant or it has a target .NET framework that is earlier than the Workflow Server's. For more information on why a custom activity may be invalid, see Microsoft's documentation on the BadImageFormatException class.

Note: In addition to the activity itself, all .dll and .exe files referenced by the activity must also be valid.

Note: Continuously trying to load an invalid custom activity may eventually lead the Workflow Server to run out of memory and stop running.

Resolution

Modify the activity (and any of its references) to make it valid. If this is not possible, do not use the custom activity (uninstall it from the Workflow Server and Designer machines and delete it from all workflows).