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


缺少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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM