随笔分类 - .NET
发表于 2024-02-29 11:37阅读次数:27评论次数:0
摘要:使用 .NET 的 IHttpClientFactory
阅读全文 »
发表于 2024-02-23 17:52阅读次数:96评论次数:0
摘要:c#转义URL中的参数 var msg = Uri.EscapeDataString("<xx/> asd"); var redirectURL = $"{SignInURL}" + $"?AESKey={Uri.EscapeDataString(encryptAESKey)}" + $"&VVRe
阅读全文 »
发表于 2024-01-26 10:28阅读次数:200评论次数:0
摘要:Connection Timeout 应用连接数据库服务器的超时时间 (默认15秒) <add name="DBVv" connectionString="Data Source=.;Initial Catalog=Vv;Integrated Security=True;Connect Timeou
阅读全文 »
发表于 2024-01-16 14:51阅读次数:1284评论次数:0
摘要:.NET 7(C#)配置使用log4net日志框架的方法 新建LogHelper帮助类 using log4net; namespace WebTestDemo.Helper { public class LogHelper() { private readonly ILog _logger = L
阅读全文 »
发表于 2023-10-12 15:08阅读次数:17评论次数:0
摘要:HttpClient 类 Bugs and Documentation Errors in .NET's HttpClient Frustrate Developers C# – Configuring HttpClient connection keep-alive Should I pass t
阅读全文 »
发表于 2023-08-24 09:25阅读次数:237评论次数:0
摘要:# 配置文件 ``` Webconfig ``` # 代码里 ``` ExcelPackage.LicenseContext = LicenseContext.NonCommercial; ```
阅读全文 »
发表于 2023-06-14 15:31阅读次数:39评论次数:0
摘要:> [C# Log4net的使用](https://zhuanlan.zhihu.com/p/518145809) # 通过NuGet直接搜索log4net进行安装 
阅读全文 »
发表于 2021-09-15 13:58阅读次数:322评论次数:0
摘要:SQL Server中调用C#类中的方法实例(使用.NET程序集) SQL Server: Could not find type in the assembly 服务器可能资源不足,或者不信任该程序集,因为它的 PERMISSION_SET 设置为 EXTERNAL_ACCESS 或 UNSAFE
阅读全文 »
发表于 2021-08-31 17:33阅读次数:44评论次数:0
摘要:ASP.NET中maxRequestLength和maxAllowedContentLength的区别;上传大文件设置IIS7文件上传的最大大小 <system.web> <httpRuntime maxRequestLength="2147483647" executionTimeout="360
阅读全文 »
发表于 2021-07-26 16:04阅读次数:1067评论次数:0
摘要:看看我 公式计算 //excel中离不开各种各样的公式计算,在Epplus中运用公式有两种方式,你都可以尝试一下: worksheet.Cells["D2:D5"].Formula ="B2*C2";//这是乘法的公式,意思是第二列乘以第三列的值赋值给第四列,这种方法比较简单明了 worksheet
阅读全文 »
发表于 2021-07-22 10:04阅读次数:224评论次数:0
摘要:看看我 看看我 using System.Web.Mvc; namespace MvcApp.Filter { /// <summary> /// 授权过滤器 /// </summary> public class LoginAuthorizeAttribute : AuthorizeAttribu
阅读全文 »
发表于 2021-05-08 14:53阅读次数:1317评论次数:1
摘要:看看我 My previous post explains how to convert a column to row in JavaScript array. In this post, we will do the same thing but with C# Array and DataTa
阅读全文 »
发表于 2021-01-28 17:36阅读次数:127评论次数:0
摘要:折叠效果 折叠代码 //#region 说明 function myfunction() { } //#endregion
阅读全文 »
发表于 2020-07-09 11:53阅读次数:152评论次数:0
摘要:Barrier
阅读全文 »
发表于 2020-07-09 11:44阅读次数:124评论次数:0
摘要:CountdownEvent
阅读全文 »
发表于 2020-07-09 11:12阅读次数:165评论次数:0
摘要:类似自动事务AutoResetEvent 类似手动事务ManualResetEvent
阅读全文 »
发表于 2020-07-03 11:04阅读次数:145评论次数:0
摘要:看看我 还有我 委托与委托之间的协变与逆变需要显式使用使用out与in,委托与方法不需要。
阅读全文 »
发表于 2020-07-01 11:44阅读次数:254评论次数:0
摘要:遇到await后,后序代码由新线程接管,即操作开始异步。 官方文档 #简易版 不阻塞主线程 class Program { static void Main(string[] args) { Console.WriteLine($"主线程{Thread.CurrentThread.ManagedTh
阅读全文 »