0

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?

4
  • You might want to try on Server Fault. Commented Dec 30, 2011 at 18:21
  • Thanks James. I posted it there as well (after your comment). Commented Dec 30, 2011 at 18:23
  • Do you have to fully restart IIS or can you just kick the Application Pool? If you can get away with just the application pool a change to the web.config (e.g. appending a comment <!-- Refreshed at 2011-12-30 10:25 -->) should do it. Sounds like a nasty problem though that warrants some investigation from the third party Commented Dec 30, 2011 at 18:26
  • @tomfumb -- we are about 8 versions back from the 3rd party's current version, so they aren't supporting us. We are scheduled to upgrade in March, so this is just temporary (they tell me this is fixed in the next version). As for the app pool, I may try that. That might be a quicker fix. The worst part is that every time I do this it kicks our users out of the app and they have to log back in and possibly lose the data they were entering while on a customer call. Not fun. Commented Dec 30, 2011 at 18:30

1 Answer 1

1

This is the right direction: VBScript and WMI to stop, monitor, start the service on the remote machine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.