Event Delivery Failed Exception
Last changed: 193.77.54.10

.
Summary

Error EventDeliveryFailedException

Typical error message:

 Event "Reply" on interface type "WorkflowConsoleApplication1.ISendMessage" for instance id "c968093d-16f3-4b48-94f6-372fc48a6c4e" cannot be delivered.

One frequent reason for this error is that the EventArgs class or any other type in the event, including sender, used is not marked as serializable. In this case you will find an InnerException with the text "EventArgs not serializable".

Even though the text complains about the EventArgs it could just as well be the sender parameter is is causing the problem. As this paramters is not used most of the time passing Nothing instead of Me is often enough to solve the problem.

Another possible reason is that the workflow you are sending a message to is already terminated. This might happen if your code is responding to an event that has already timed out allowing the workflow to terminate. The error is misleading in this case because the WorkflowRuntime doesn't know that the workflow has finished and tries to load it from the, in this case, non existent WorkflowPersistenceServices. In this case you will find an InnerException with the text "The workflow hosting environment does not have a persistence service as required by an operation on the workflow instance "SomeId"."

Note that if the Workflow is still executing after the DelayActivity has caused a timeout on the HandleExternalEventActivity the event doesn't raise an error but is never received either.