WSS 3.0 error: Value does not fall within the expected range

Learn how not setting appropriate values when deploying a workflow can affect seemingly unrelated functionality in WSS 3.0, and how you can avoid getting such errors.



You create a simple Visual Studio workflow, one that has only an OnWorkflowActivated activity with no other code than code that binds the WorkflowId property. You create the feature.xml and the workflow.xml using standard Windows SharePoint Services Workflow code snippets. You deploy the workflow using the install.bat file.

Now when you try to access the Form Library Settings page of any Form Library on the site where the workflow was activated, you get the error:

Value does not fall within the expected range.


Check whether you have filled out all of the required values in the feature.xml and workflow.xml files. If you use the Windows SharePoint Services Workflow code snippets, the required values are highlighted in green.

In my case, I had left the TaskListContentTypeId, the AssociationUrl, InstantiationUrl, ModificationUrl, StatusUrl in the workflow.xml file, without setting appropriate values for them, because I was not using them.

Part of my workflow.xml file looked like the following:

I resolved the error by deleting these attributes. If you do not require certain optional workflow attributes or elements, delete them from the workflow.xml file.

Note: The error listed in this article is a generic and misleading error message, which can have other causes than the one mentioned above.

Related Articles