Paul Mehner

After the past several months of installing and removing monthly software CTPs of Visual Studio, ORCAS, SQL 2005, and WF I can no longer run a Console Hosted Workflow on one of my machines. The process never comes back (nor does it time out) when executing the following statement:

WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(WorkflowConsoleApplication11.Workflow1));

Sample applications as well as new console applications behave this way; however, applications hosted in a local service seem to behave okay. I had the same beahvior on another computer and ended up burning it to the ground to fix the problem. I've tried running all of the removal tools and re-installing everything (including visual studio and sql server) ad-naseum and nothing cures the problem. I recently removed WinFX, Orcas, and WF and installed the 2.2 version (WF only) and have identical result. The box has a lot of software on it and I'm dreading having to burn it all the way to the ground to fix the problem; I've just transfered all of my WF development to two other computers. Eventually I would like to get the computer in question running WF again. I suspect that something is no doubt being left behind from an earlier installation, but I haven't been able to find it. Any thoughts or suggestions




Re: Windows Workflow Foundation Console Workflows Hangs

SonaliC

Try to handle the events ServicesExceptionNotHandled, WorkflowTerminated, WorkflowAborted, WorkflowSuspended on WorkflowRuntime in the host. That might give some information about what is going wrong.




Re: Windows Workflow Foundation Console Workflows Hangs

Paul Mehner

Thanks for the suggestions! I wired an event handler to every event of the workflow. There are no events being fired once the CreateWorkflow method is called. Any other ideas




Re: Windows Workflow Foundation Console Workflows Hangs

Angel Azcarraga - MSFT

Hi Paul,

Sounds like you may have some lingering stuff on that machine. It sounds like you've been successful running this on other machines, which clearly indicates that it's a configuration issue.

Try your work on our latest bits (RTM) and please open up a new post if you're still having trouble.

Thanks,
Angel






Re: Windows Workflow Foundation Console Workflows Hangs

Eric Litovsky

Did you find a fix for this

I'm having the same issues and can't seem to figure out what's causing it.


Code Snippet

static void Main(string[] args)

{

using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())

{

AutoResetEvent waitHandle = new AutoResetEvent(false);

workflowRuntime.WorkflowCompleted += delegate(object sender, WorkflowCompletedEventArgs e) { waitHandle.Set(); };

workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e)

{

Console.WriteLine(e.Exception.Message);

waitHandle.Set();

};

WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(WorkflowLibrary1.Workflow1));

instance.Start();

waitHandle.WaitOne();

Console.ReadKey();

}

}

When this code is hit from within the workflow console app the IDE locks up but only when the workflow console application is the originator of the process. If I run the same code from a console app in a separate project (with a reference to a workflow library/console app) there is no issue.

Also, if I expose the method publicly and just call it from a different process, it executes without issue.

I'm trying to figure out if this is a VS IDE bug or if my configuration needs to be examined. I'm running on Longhorn Beta 3 with Orcas Beta 1.

If anyone has run into a similar issue, please let me know or post your thoughts on this. I would appreciate any feedback.

Thanks.


Eric.