public ActionResult AjaxPostCorssDomain([FromBody] AjaxPostParam postParam) { string url = postParam.url; string json = postParam.json; try { var _result = PostHelper.GetPostResult(url, json); var json_result = Json(_result); return(json_result); //var result = ApiJsonHelper.LargeJson(_result); //return result; } catch (Exception ex) { //用log4net记录日志 _Log4Net.Error("AjaxPostCorssDomain." + url + "." + json, ex); //Logger.Default.Error("AjaxPostCorssDomain异常:{0}", ex); return(Json(JsonConvert.SerializeObject(new ResultParam { IsSuccess = false, AlertMessage = JsonConvert.SerializeObject(ex), }))); } }
protected ActionResult AjaxPostCorssDomain(string url, string json) { try { var _result = PostHelper.GetPostResult(url, json); return(JsonHelper.LargeJson(_result)); } catch (Exception ex) { //用log4net记录日志 _Log4Net.Error("AjaxPostCorssDomain." + url + "." + json, ex); // Logger.Default.Error("AjaxPostCorssDomain异常:{0}", ex); return(Json(JsonConvert.SerializeObject(new ResultParam { IsSuccess = false, AlertMessage = JsonConvert.SerializeObject(ex), }))); } }