I've created a custom workflow action using the VS2010 for SharePoint 2010 online. But whenever I use the custom action within a workflow and attach it to a list, it never runs successfully. While debuging, I always get the following error: "Function evaluation disabled because a previous function evaluation timed out. You must continue execution to re-enable function evaluation." in the following code snippet:

SPSite oSite=new SPSite(context.CurrentWebUrl);

where context is the 'SPUserCodeWorkflowContext'. 'context.CurrentWebUrl' always return the current site url. But the 'SPSite' object does not work.

Any help would highly be appreciated. Thanks.

1 Answer 1


I am guessing a little bit because of the lack of more of your code but are you performing something like the following?

    using (SPSite site = new SPSite(context.CurrentWebUrl))
        using (SPWeb web = site.OpenWeb())

"The code gets the context to the current Site using the workflow context, and then opens the current Web and creates a site within it with the specified name."



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.