Ejemplo n.º 1
0
 public HttpResponseMessage Ping()
 {
     try
     {
         bool isCrmAvailable = crmService.PingCRM();
         return(Request.CreateResponse(isCrmAvailable ? HttpStatusCode.OK : HttpStatusCode.ServiceUnavailable));
     }
     catch (Exception ex)
     {
         Trace.TraceError("Unexpected error Ping::Message:{0}||Trace:{1}", ex.Message, ex.StackTrace.ToString());
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }