I'm writing an app that's sole purpose is to determine if one of our core applications is up and running in production. This application is a WCF application. The app is up and running on two different boxes behind a load balancer. The site on each box is configured to listen to traffic for the following DNS name: app.company.com. DNS resolves app.company.com to our load balancer which then hands the request off to one of the two boxes in a round robin fashion. In terms of determining if our core application is up it is not acceptable to just hit the load balancer with a request as the load balancer might round robin us to an active server even if one of the servers is down and our app needs to be able to determine if one of the boxes is down. Yes the load balancer already checks to a limited extent that the server is up but it doesn't cover all scenarios.
The problem I'm having is I cannot send traffic directly to each box (by IP or host name) as the host header (app.company.com) has to be in the request or either the destination server or WCF will reject it. If I use app.company.com instead of the host name or IP address I'll hit the load balancer, if I modify the hosts file on the machine it will only work for one box.
Is there a way to force DNS resolution within .Net or Windows to resolve app.company.com to an IP address of my choosing in a way that can be fine tuned for each request and not affect DNS for the entire system? Elsewise I will probably be looking at hand crafting a request so that I can embedd the correct host header in a request not actually going to the target of the same DNS name.
Thanks