admin管理员组文章数量:1643945
sqlsugar 排查方式
https://www.donet5/home/doc?typeid=1218
连接字符串:server=.;uid=sa;pwd=haosql;database=SQLSUGAR4XTEST
如果ORM连接不上数据库:
请使用原生写法测试:new SqlConnection(“字符串”).Open(); 原生写法通过ORM就能用
new SqlConnection(db.CurrentConfig.ConnectionString).Open()//原生进行测试 是否是 SqlSUgar问题
如果是偶发情况:那么就使用SqlSugarScope 单例模式保证线程安全或者排查线程问题
sqlsugar net8 Only the invariant culture is supported in globalization-invariant mode. See https://
{
“code”: 500,
“message”: “程序异常!”,
“data”: "中文提示 : 连接数据库过程中发生错误,检查服务器是否正常连接字符串是否正确,错误信息:Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter ‘name’)\r\nen-us is an invalid culture identifier.DbType=“SqlServer”;ConfigId=“1”.\r\nEnglish Message : Connection open error . Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter ‘name’)\r\nen-us is an invalid culture identifier.DbType=“SqlServer”;ConfigId=“1” ",
“success”: false
}
报错显示:这个问题是由于.NET Core应用程序在全球化不变的模式下运行,而该模式只支持不变的文化,而不支持其他任何文化。
解决方法:
将 <InvariantGlobalization>true</InvariantGlobalization>里面的内容改成false即可。
参考链接
https://blog.csdn/lihuxie/article/details/134795017
https://www.donet5/Ask/9/23402
本文标签: InvariantcultureSqlSugarModeHTTPS
版权声明:本文标题:sqlsugar net8 Only the invariant culture is supported in globalization-invariant mode. See https: 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729377210a1198980.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论