1. 程式人生 > >.net core部署到linux可能碰到的問題

.net core部署到linux可能碰到的問題

blank sys icu platform 出現 win .exe 2008r2 ins

缺少icu庫
以獨立部署 (SCD)的方式發包,運行時報錯
錯誤信息:FailFast: Couldn‘t find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
解決方法有三
1、安裝icu庫,運行命令:yum install icu
2、項目配置文件
.runtimeconfig.json,加入以下配置
{"runtimeOptions": {
"configProperties": { "System.Globalization.Invariant": true } } }
3、項目csproj添加以下配置
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>

連接SqlServer 2008R2數據庫超時

.Net Core 在 Linux 下連接 SqlServer 需要 SqlServer2008 SP3或以上版本,或SqlServer2012,或SqlServer2014.

如果SqlServer2008低於SP3版本,會出現連接超時的問題。

解決辦法:

官方下載SqlServer 2008 Sp3 補丁

https://download.microsoft.com/download/9/6/4/964BB4EC-FC28-4DA7-9295-7D4A8FDBE1A4/CHS/SQLServer2008R2SP3-KB2979597-x64-CHS.exe 64位

https://download.microsoft.com/download/9/6/4/964BB4EC-FC28-4DA7-9295-7D4A8FDBE1A4/CHS/SQLServer2008R2SP3-KB2979597-x86-CHS.exe 32位

httpclient訪問https資源報錯

錯誤信息:System.PlatformNotSupportedException: The handler does not support client authentication certificates with this combination of libcurl (7.29.0) and its SSL backend ("NSS/3.28.4").

解決方法請看以下連接

解決linux netcore https請求使用自簽名證書忽略安全檢查方法

Centos curl ssl 替換 NSS 為 OpenSSL

參考:https://blog.csdn.net/Free_Wind22/article/details/81061653

.net core部署到linux可能碰到的問題