public class Public { private static Public _instance = new Public(); /// <summary> /// 全局访问点 /// </summary> public static Public Instance { get { return _instance; } } /// <summary> /// 解析post流数据 /// </summary> /// <returns></returns> public string ShowUrlPostData() { try { Stream s = HttpContext.Current.Request.InputStream; byte[] result_byte = new byte[1024]; MemoryStream ms = new MemoryStream(); int count = s.Read(result_byte, 0, result_byte.Length); while (count != 0) { ms.Write(result_byte, 0, count); count = s.Read(result_byte, 0, result_byte.Length); } string json_result = HttpUtility.UrlDecode(Encoding.UTF8.GetString(ms.ToArray())).Trim('='); return json_result; } catch { } return ""; } }