杀死长期运行的循环C#iis
我的运行循环很长,在运行C#代码的IIS上的Web应用程序中启动。我处于开发模式,因此我经常连接到W3P3过程,测试循环,故障排除等。这是预期的。没想到的是,在杀死当前的运行W3P3过程之后,循环继续执行。我已经测试了很多次,但我无法完全弄清楚如何杀死循环(杀死该过程,哪个过程?)。
我无意进行编码,“客户是否仍然连接”,因为无论客户端是否连接,这是继续运行的正确行为,但是在开发模式下,我需要能够杀死它。 哪个过程持续并运行循环?
I have a long running loop that kicks off in my web app on IIS running my C# code. I'm in development mode, so I'm attaching to the W3P3 process often, testing my loop, troubleshooting, etc.. and when I kill my interactive session in Visual Studio the loop keeps running. This is expected. What is not expected, is that after I kill the current running W3P3 process, the loop continues to perform. I have tested this many times and I just can't quite figure out how to kill the loop (kill the process, which process?).
I have no intent of coding, "is client still connected", because it is the correct behavior to continue to run, whether or not the client is connected or not, however in development mode I need to be able to kill it.
Which process is persisting and running the loop?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论