1)
"The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again"
Set
SPWebObject.AllowUnsafeUpdates = true;
This should work as a breeze
2)
"New instances of this workflow template are currently disallowed"
This is probably the easiest one:
Go to Doc library settings --> workflow settings--> Remove workflows --> select "Allow New Instances"
Friday, April 10, 2009
Workflow Errors
Although you can get lot of wierd errors but I am here describing the ones I got and spent almosta day figuring out:
"Operation is not valid due to the current state of the object"
and
"Exception from HRESULT: 0x8102009B"
The funny part is that these are really not errors which halt your progress. These
errors can occur when you try to start a workflow that is
--------------------------------------------------------------
a) already running
or
b) errored
and therefore cannot be started again.
The stack trace will look something like:
Microsoft.SharePoint.SPException: Exception from HRESULT: 0x8102009B ---> System.Runtime.InteropServices.COMException (0x8102009B): Exception from HRESULT: 0x8102009B
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 .....
-----------------------------------------------------------------
So I would suggest you to check the item or wait for few mins before workflow shows up in the "View Workflow history" pane. For some reason when you kick start the workflow through the code it takes few mins to actually start.
"Operation is not valid due to the current state of the object"
and
"Exception from HRESULT: 0x8102009B"
The funny part is that these are really not errors which halt your progress. These
errors can occur when you try to start a workflow that is
--------------------------------------------------------------
a) already running
or
b) errored
and therefore cannot be started again.
The stack trace will look something like:
Microsoft.SharePoint.SPException: Exception from HRESULT: 0x8102009B ---> System.Runtime.InteropServices.COMException (0x8102009B): Exception from HRESULT: 0x8102009B
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddWorkflowToListItem(String bstrUrl, String bstrListName, Int32 .....
-----------------------------------------------------------------
So I would suggest you to check the item or wait for few mins before workflow shows up in the "View Workflow history" pane. For some reason when you kick start the workflow through the code it takes few mins to actually start.
Labels:
Custom Actions,
Library,
MOSS,
MOSS 2007,
preview 4,
SharePoint,
WF,
Workflow,
Workflows,
WSS
Fixes for SharePoint Timer Service
If you are looking for options to speed up the response time of the SharePoint Timer Service so that you can get your emails out faster or for anything else, try the following (at your own risk)
The following steps can improve the accuracy of the delay action:
* Ensure Windows 2003 SP 2 is installed
* Install hotfix available here http://support.microsoft.com/default.aspx?scid=kb;en-us;932394
* Run the following stsadm command, replacing server with your servername.
PLEASE NOTE: the full impact of increasing the frequency of the workflow timer job is not known.
stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 1 minutes between 0 and 59" -url http://server
Also, some additions have been made and incorporated in the Windows SharePoint Services 3.0 post-Service Pack 1 hotfix package that could help the Timer Service work a bit better.
The following steps can improve the accuracy of the delay action:
* Ensure Windows 2003 SP 2 is installed
* Install hotfix available here http://support.microsoft.com/default.aspx?scid=kb;en-us;932394
* Run the following stsadm command, replacing server with your servername.
PLEASE NOTE: the full impact of increasing the frequency of the workflow timer job is not known.
stsadm -o setproperty -propertyname "job-workflow" -propertyvalue "every 1 minutes between 0 and 59" -url http://server
Also, some additions have been made and incorporated in the Windows SharePoint Services 3.0 post-Service Pack 1 hotfix package that could help the Timer Service work a bit better.
Labels:
MOSS,
MOSS 2007,
service,
SharePoint,
timer,
timer service,
WSS
Subscribe to:
Posts (Atom)