随笔分类 - .NET
摘要:前言 在C#中使用HttpWebRequest发起HTTP请求时,达到最大并发和性能可以从以下几个方面改进: 1、ServicePointManager设置 ServicePointManager 类是一个静态类,它提供了用于管理HTTP连接的属性和方法。为了提升并发性能,你需要调整以下几个关键属性
阅读全文
摘要:方案一 asp.net mvc默认的json序列化ValueProviderFactory使用的是javascriptserializer,可以在配置文件web.config中设置: <add key="aspnet:MaxJsonDeserializerMembers" value="150000
阅读全文
摘要:如 public class Person { public string Name{get;set;} public int Age{get;set;} } public class Student : Person { public string Grade {get;set;} [Newton
阅读全文
摘要:using StackExchange.Redis; using System; using System.Configuration; using System.Linq; using System.Threading; using System.Threading.Tasks; namespac
阅读全文
摘要:.NET在Windows Server环境让IIS上支持高并发前言1、调整IIS应用程序池配置2、调整IIS的appConcurrentRequestLimit设置3、调整machine.config中的processModel > requestQueueLimit的设置4、修改注册表,调整IIS
阅读全文
摘要:Swagger原理 Swagger就是利用反射技术遍历所有Api接口,并且从xml文件中读取注释,在利用Swagger内置的模板组合html显示至客户端实现接口可视化,并且可调用。 在WEB Api中,引入了面向切面编程(AOP)的思想,在某些特定的位置可以插入特定的Filter进行过程拦截处理。引
阅读全文
摘要:nuget 安装Swashbuckle 安装完成后会在App_Start中生成SwaggerConfig.cs 项目右键属性生成xml文件 在SwaggerConfig中的Register中进行配置 //在内部的GlobalConfiguration.Configuration.EnableSwag
阅读全文