Programmatically calling validation in a rehosted Workflow 4 designer

The workflow designer has a rich programming model that supports communication with the host. A rehosted workflow designer will automatically validate a workflow when it is changed; in order to programmatically call validation on demand on a rehosted designer, use the following method: designer.Context.Services.GetService<ValidationSErvice>().ValidateWorkflow(); To handle resulting validation errors, publish an implementation of IValidationErrorService, which…


WF 4 hosting options: IIS, AppFabric, and Windows Service

Most of the Windows Workflow Foundation samples use workflows that are hosted in a console application, but this isn’t a realistic scenario for real-world workflows. Workflows in actual business applications will be hosted in persistent processes- either a Windows service authored by the developer, or a server application such as IIS or AppFabric. The differences…


HttpContext.Current returning null when using NetTcpBinding in WCF4

When using NetTcpBinding, not all of the features of WCF are available, particularly those using HTTP. NetTcpBinding removes a dependency on HTTP (and IIS as a result, allowing the service to be hosted in WAS instead.) HttpContext.Current is one of the features in WCF that is not available when using NetTcpBinding.


Error message in WF4: "Error: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements"

When loading an activity assembly using Assembly.LoadFrom, you may see the following error: “Error: The values provided for the root activity’s arguments did not satisfy the root activity’s requirements:                 ‘UserDefinedInputClass’: Expected an input parameter value of type ‘MyAssembly.UserDefinedClass’            for parameter named ‘UDC’. Parameter name: rootArgumentValues” Assembly.LoadFrom does not use the main application context;…