ASP.Net 重新启动 IIS
长话短说——我们有 2 个网络服务器运行第 3 方 ASP.NET 应用程序。随机地(到目前为止)他们只是......停止工作。我有一个外部检查,它会在一分钟左右的时间内告诉我它何时停止工作。现在我必须通过 RDP 进入计算机并发出 iisreset。这很好,直到我不在机器旁并且我必须去一个PDQ。
我编写了一个简单的页面,它将在有问题的远程计算机上发出 iisreset。这通常有效。有时“iisrestart \machinename”会停止 IIS 服务,但不会重新启动它,这很糟糕。
理想情况下,我想知道是否可以停止该服务,然后尝试启动它,如果它在 10 秒内没有启动,请尝试再次启动它。但我不知道如何远程监控服务的状态。
有人能指出我正确的方向吗?
Long story short -- we have 2 webservers that run a 3rd party asp.net application. Randomly (so far) they just...stop working. I have an outside check that will tell me when it stops working within a minute or so. Right now I have to get onto the machines through RDP and issue an iisreset. Which is fine until I'm not at a machine and I have to get to one PDQ.
I wrote a simple page that will issue an iisreset on the offending remote machine(s). This works, usually. Sometimes "iisrestart \machinename" will stop the IIS service, but not restart it, which is bad.
Ideally, I'd like to know if I can just stop the service, try to start it, and if it doesn't start in 10 seconds, try to start it again. But I don't know how to monitor the status of a service remotely.
Can someone point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是正确的方向:VBScript 和 WMI 来停止、监视、启动远程计算机上的服务。
This is the right direction: VBScript and WMI to stop, monitor, start the service on the remote machine.