public void ProcessRequest(HttpContext context) { string body = null; using (StreamReader sr = new StreamReader(context.Request.InputStream)) { body = sr.ReadLine(); } Dictionary <string, string> req = JsonConvert.DeserializeObject <Dictionary <string, string> >(body); int status = req["cmd"] == "ban" ? 1 : 0; string login = req["login"]; PersonDAO dao = new PersonDAO(); DateTime?dateTime = null; if (req.ContainsKey("time")) { dateTime = DateTime.Parse(req["time"]); } dao.SetStatus(login, (Core.Models.AuthStatus)status, dateTime); }