Search code examples
c#workflowworkflow-foundation-4

Workflow throwing error when changing site name in IIS


Initially our workflow configured under Test Site name and Test virtual directory name. we are trying to rename Test Site to Default Web Site and workflow throwing below error for existing instances. I have updated the SiteName from Test to Default Web Site in ServiceDeploymentsTable table but still throwing same error. Is there a way i can update this site name as i want my workflow to run under Default Web Site.

System.ServiceModel.FaultException: The execution of an InstancePersistenceCommand was interrupted because the instance key '0e168682-17c0-6395-e3d8-1057af08c935' was not associated to an instance. This can occur because the instance or key has been cleaned up, or because the key is invalid. The key may be invalid if the message it was generated from was sent at the wrong time or contained incorrect correlation data.


Solution

  • This has to do with how correlation keys are calculated. See 1 for more information on that.

    It uses the site name in the surrogate key creation so you'll have this problem with lookups. You can start new workflows on the Default Web Site, but old ones won't be able to do the correlation lookup.

    SO: Workflow correlation issues on Azure