I have declared an object in my global.asax file as follows.
<object Id='WFRuntime' RunAt='Server' Class='System.Workflow.Runtime.WorkflowRuntime' Scope='application'>
While I’m able to access this object within the global.asax file methods, I’m not able to use it elsewhere in the asp.net web application. I’m using .net 3.5 framework.
Any directions?
Thanks, Socratees.
First, ensure that your Global.asax file has a code-behind
If you don’t have one, create a Global.asax.cs file. This must be in your App_Code directory if you have a Web Site instead of a Web Project. It must look something like this:
That should make it so all pages in your site can reference ((Global)Context.Application).WFRuntime.
Alternatively, you could make the WFRuntime member static and then just use ‘Global.WFRuntime’ throughout your site.