public ActionResult CommandLineProcess(string cmd) { Server.ScriptTimeout = 3600; object result; if (string.IsNullOrEmpty(cmd)) { result = new { Success = false, Message = "Missing command" } } ; else { var scriptResult = CommandLineUtility.Execute(cmd); result = new { scriptResult.Success, scriptResult.Message, scriptResult.Data }; } return(Json(result)); }