web api
吃瓜农
bug
展开
-
web api JSON格式化
在WebApiConfig 注册下 GlobalConfiguration.Configuration.Formatters .JsonFormatter.SerializerSettings = new Newtonsoft.Json.JsonSerializerSettings() { //NullVal...原创 2019-05-13 09:42:02 · 382 阅读 · 0 评论 -
请求参数为null问题
js请求参数为: var param={ "id": "28c28b61-c671-4b47-b7db-035243184f84", "num":1, "str":"xxxx", "time":"2019-5-10 14:21", }; 后端接收实体: public class TestParam { public Guid Id...原创 2019-05-13 09:42:19 · 6343 阅读 · 0 评论 -
ajax调用一般处理程序.ashx
1.一般调用ashx,使用switch public void ProcessRequest(HttpContext context) { switch (context.Request["action"]) { case "Getxxx": break; case "Setxxx": ...原创 2019-09-29 09:13:01 · 662 阅读 · 0 评论 -
net mvc异常记录
1.记录自己抛出的异常 public class MExceptionLogAttribute : ActionFilterAttribute { /// <summary> /// 自定义异常 捕获异常并记录日志 /// </summary> /// <param name="contex...原创 2019-09-29 09:49:47 · 196 阅读 · 0 评论