asp.net接收post过来的json数据
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); using (var reader = new System.IO.StreamReader(context.Request.InputStream)) { string jsonData = reader.ReadToEnd(); if (!string.IsNullOrEmpty(jsonData)) { try { DALApiYian dal = new DALApiYian(); dal.ReceiveOrder(jsonData); } catch { } context.Response.Write(jsonData); } else { context.Response.Write("FAIL"); } } }