Last post Jan 20, 2014 06:46 AM by nidabp
Jan 14, 2014 10:56 AM|nidabp|LINK
We have critical .asmx web services, which need to be running all the time. We are planning to develop a tool in c# to monitor those web services at all times and send us alerts if anything is wrong. We want it to be a fool proof solution which can also
return response times of each service along with the heartbeat at regular intervals. How to go about acheiving the same. Is there any standard way of doing it?
Jan 14, 2014 11:14 AM|AidyF|LINK
The best way is a Windows Service that requests a method every few seconds (or however long you want to check it) and send an email on errors, and this service can also log performance stats etc. Maybe log them to the performance monitor, or just a text
file if you want an historic record. Creating Windows Services is out of the scope of this forum though. If your service is public then there are plenty of third party solutions that will do all of this monitoring for you remotely, likewise I'm sure you'll
find code for accessing services and emailing on failure, logging performance etc if you search for availability monitors.
Jan 15, 2014 09:51 AM|nidabp|LINK
Thank you AidyF. Is it possible to check the heartbeat without actually calling the web method. In WCF, we can add a ping method dynamically to the endpoint and check if the service is working or not. Is there a way we can do it for an asmx service?
Jan 15, 2014 09:53 AM|AidyF|LINK
Not that I know of, asmx is a lot more basic than WCF. You'd either have to call one of the actual methods, or just create a "Ping" or "IsAlive" method to call.
Jan 20, 2014 06:46 AM|nidabp|LINK
Thanks AidyF. The asmx services read and write to the database. I can call the actual methods that read from the database by putting a dummy record and read it. But is there a way that I can call the methods that write to the database.