在Post请求时,将Request带来的序列化,这样不管是Request.Form还是Request.QueryString都一样能获取。
Stream s = Request.InputStream; byte[] b1 = new byte[s.Length]; s.Read(b1, 0, b1.Length); string str1 = Encoding.UTF8.GetString(b1); JObject postObj = JsonConvert.DeserializeObject<JObject>(str1);