SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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."

share|improve this answer
You probably already found this but this is related to your error message. – Kernel Panic Aug 16 '13 at 17:20
Thanks Bob for your valuable reply. I'm still struggling with this issue though. – SharepointGeek Aug 17 '13 at 19:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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