public async Task <IActionResult> quitService() { string json = null; try { Request.EnableBuffering(); using (var stream = Request.Body) { using (var reader = new StreamReader(stream)) { json = await reader.ReadToEndAsync(); } } var service = JSON.Deserialize <SRCMessage>(json); if (service.service_id == "" || service.service_name == "") { return(Base.AjaxBase.ResponseAjax(400, 400, "service_id or service_name not is not allowed!", Config.Instance)); } else { SRC.Quit(service); SRC.Send(service); return(Base.AjaxBase.ResponseAjax(200, 200, "Quit Service successful", Config.Instance)); } } catch (Exception e) { LogHelper.Error(e, Config.logName); return(Base.AjaxBase.ResponseAjax(500, 500, e.Message.ToString(), Config.Instance)); } }