调试自托管工作流服务会在30秒后在WorkflowServiceHost中导致错误 [英] Debugging a Self-Hosted Workflow Service causes a Fault in WorkflowServiceHost after 30 seconds

查看:64
本文介绍了调试自托管工作流服务会在30秒后在WorkflowServiceHost中导致错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序,该应用程序自托管工作流服务(通过WorkflowServiceHost),然后通过net.pipe与它进行通信(进程内).一切工作正常,直到开发人员想要调试工作流中活动背后的代码.甚至 然后,一切工作正常,直到开发人员在断点上停留约30秒以上,然后再进行下一个步骤".或F5导致WorkflowServiceHost故障,工作流实例被中止(但未持久-出现 永久执行"在实例存储中),并且WorkflowServiceHost变得不可用.

We have an application which self-hosts a workflow service (via WorkflowServiceHost), and then communicates with it (in-process) via net.pipe. Everything works perfectly, until a developer wants to debug the code behind the activities in the workflow. Even then, everything works perfectly until the developer sits on a break point for more than about 30 seconds, at which point the next "Step" or F5 causes the WorkflowServiceHost to fault, the workflow instance to be aborted (but not persisted - it appears to be perpetually "Executing" in the instance store) and the WorkflowServiceHost to become unusable.

我已启用服务跟踪和工作流跟踪,并且似乎没有与工作流活动本身相关的任何错误-仅是WorkflowServiceHost错误的错误,然后是工作流实例被中止.

I've enabled service tracing and workflow tracking and there don't appear to be any errors related to the workflow activities themselves - only the error that WorkflowServiceHost faulted, followed by the workflow instance being aborted.

我什至尝试将内部属性WorkflowServiceHost.PersistTimeout(似乎默认为30秒)设置为一小时,但在停在断点处约30秒钟不活动后,仍然会发生错误.

I've even tried setting the internal property WorkflowServiceHost.PersistTimeout (which seems to default to 30 seconds) to one hour, but the fault still happens after about 30 seconds of inactivity while stopped at a breakpoint.

有什么想法可以更可靠地调试自托管工作流服务吗?

Any idea how to more reliably debug self-hosted workflow services?

推荐答案

HI wbradney

HI wbradney

感谢您的反馈.

对于此问题,建议使用 Microsoft.Activities.UnitTesting 和Microsoft.Activities.UnitTesting是一个单元测试框架,旨在简化使用Windows Workflow Foundation(WF4)构建的活动和工作流服务的单元测试.封装WorkflowInvoker的测试主机, WorkflowApplication和WorkflowServiceHost.

For this issue, it’s recommended to use Microsoft.Activities.UnitTesting, and Microsoft.Activities.UnitTesting is a unit testing framework designed to make it easier to unit test activities and workflow services built with Windows Workflow Foundation (WF4). Test Hosts which wrap WorkflowInvoker, WorkflowApplication and WorkflowServiceHost.

此外,它还提供了许多功能,允许您调试,跟踪工作流.

最诚挚的问候

Angie Xu


这篇关于调试自托管工作流服务会在30秒后在WorkflowServiceHost中导致错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆