A. If the system is down it cannot generate a response. But that's a good thing, otherwise you would not be able to detect if it's down or not.
B. If there's an exception the client will still get a response (500 for example) which tells it that the server is up (but with problems).
C. On the controller level I think this is the best you can do:
[Route("/alive")]
[AllowAnonymous]
[HttpGet]
public string Alive()
{
return "I'm alive and loving it!";
}
D. For setting up custom error response for errors please see Global Error Handling in ASP.NET Web API 2 or Exception Handling in ASP.NET Web API's Exception Filters:
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.Filters.Add(new ProductStore.NotImplExceptionFilterAttribute());
// Other configuration code...
}
}