Symptoms
Deployment Issue
Diagnoses
When deploying a workflow through the deployment tool in production the tool froze and the following error was logged in the host server logs.
"InternalMarshalError","SourceCode.Server.Runtime.HostServerBroker.internalMarshal"
The workflow was able to be deployed via visual studio. The error occurs when deployed through the deployment tool.
Resolution
The solution described in the following URL was implemented.
http://blog.velocity-it.com/2015/03/05/solving-asourcecode-smartobjects-configuration-smartobjectsruntimeconfigurationsection-cannot-be-cast-to-bsourcecode-smartobjects-configuration-smartobjectsruntimeconfigurationsection/
Essentially the dll from the HostServerin directory was used to overwrite the assembly in the ServiceBroker directory.