如何使用c#连续监视进程并在asp.net中查找进程何时结束? [英] How to continuously monitor a process and find when the process is over in asp.net with c#?

查看:69
本文介绍了如何使用c#连续监视进程并在asp.net中查找进程何时结束?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#连续监控进程并在asp.net中查找进程何时结束?我已经启动了一个Windows服务进程并且它在一段时间后正在运行。但是我希望连续监视相同的内容并查找进程是否结束。

How to continuously monitor a process and find when the process is over in asp.net with c#?I have started a windows service process and its working after a while. But I want to monitor the same continuosly and find whether the process is over.

推荐答案

您可以使用登录EventLog管理事件源。并阅读您网站上的该日志,以监控该服务是否已记录其停止消息。 (或者您可以在自定义的持续时间后继续显示foreeach日志)。



管理事件日志阅读本文 [ ^ ]
You may manage an event Source with log in EventLog. and read that log in your website to monitor if the service has logged its stop message or not. (or you may keep showing foreeach log after custom defined duration).

To Manage Event Log Read this[^]


这篇关于如何使用c#连续监视进程并在asp.net中查找进程何时结束?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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