● stackexchange.redis 抛出timeout异常
前言
最近在用.Net Core 做业务模块时,发现经常会出现TimeOut 超时的情况。然后看了官方的解释,说2.0版本之后维护了一个专用的线程池。我就打算阅读源码,看一下这个线程池的实现。
Read more →凡是过往,皆为序章。
最近在用.Net Core 做业务模块时,发现经常会出现TimeOut 超时的情况。然后看了官方的解释,说2.0版本之后维护了一个专用的线程池。我就打算阅读源码,看一下这个线程池的实现。
Read more →var culture = CultureInfo.CreateSpecificCulture("zh-CN");
var dateformat = new DateTimeFormatInfo
{
ShortDatePattern = "yyyy-MM-dd",
LongDatePattern = "yyyy-MM-dd hh:mm:ss"
};
culture.DateTimeFormat = dateformat;
var supportedCultures = new[]
{
culture
};
app.UseRequestLocalization(new RequestLocalizationOptions
{
DefaultRequestCulture = new RequestCulture(culture),
SupportedCultures = supportedCultures,
SupportedUICultures = supportedCultures
});
之前写了个系统监控的程序,在某次升级一个项目后,每隔2个月左右会收到服务器的监控提醒,使用top
命令查询发现一个核心asp.net core web api内存异常。
服务 CPU 或 内存偶尔飙高是部署环境中经常遇到的问题,一般会采用记录日志的方式来诊断,不过有些情况靠日志可能并不能分析出个所以然,面对实在无头绪的问题也只能暂时使用重启大法先恢复。
为了尽可能精准的定位问题,掌握通过 dump 分析服务运行堆栈信息也是非常必要的,本文将分别介绍如何对 .NET Core 2.2 和 .NET Core 3.1 项目进行 dump 分析(这里只针对 Linux 下使用容器部署的方式)。
Read more →今天测试.net core 2.2到3.1时,顺便更新了EPPlus版本。导出excel时报错:
2021-03-31 20:51:27,481 [5] ERRORStaffController - OfficeOpenXml.LicenseException: Please set the ExcelPackage.LicenseContext property. See https://epplussoftware.com/developers/licenseexception
at OfficeOpenXml.ExcelPackage.get_Workbook()
at OfficeOpenXml.ExcelPackage.CreateBlankWb()
at OfficeOpenXml.ExcelPackage.ConstructNewFile(String password)
at OfficeOpenXml.ExcelPackage..ctor(FileInfo newFile)
at PartnerPlatform.Service.StaffExport.ExportExcelSingleWorksheets(IDbConnection dbConnection, String sWebRootFolder, String fileName, List`1 staff) in /Users/jinyazhou/Test/PartnerPlatform/Service/ExcelExport.cs:line 43
at PartnerPlatform.Controllers.StaffController.Export() in /Users/jinyazhou/Test/Controllers/ExcelController.cs:line 19
Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/3.1.13/System.Runtime.Serialization.Primitives.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
原因: EPPlus 5.0 以后的版本需要指定 商业证书 或者非商业证书。你需要在代码里指定证书或者降低EPPlus版本。在代码里面指定非商业证书:
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
目前个人网站是使用MWeb写作,然后生成本地html,使用GoodSync通过FTP把本地html同步到网站服务器。
GoodSync功能强大,但是收费软件,过试用期会定期弹窗,且免费版不能同步超过100个文件。
所以我尝试自己写一个同步软件,满足以下功能即可:
未雨绸缪,公司IoT项目中可能会出现的情况:
Unable to bind to https://localhost:5001 on the IPv4 loopback interface: 'HTTP/2 over TLS is not supported on macOS due to missing ALPN support.