0
点赞
收藏
分享

微信扫一扫

Qt QWidget 简约美观的加载动画 第五季 - 小方块风格

Java架构领域 02-27 17:00 阅读 3

1、SqlSugarCore 相关

1.1 主项目添加数据,否则会报数据库连接错误:

  <InvariantGlobalization>false</InvariantGlobalization>

<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
  <Nullable>enable</Nullable>
  <ImplicitUsings>enable</ImplicitUsings>
  <GenerateDocumentationFile>True</GenerateDocumentationFile>
  <InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>

1.2   数据库连接字符串添加  Encrypt=True;TrustServerCertificate=True; 否则会报数据库连接中文错误:


 "ConnectionString": "Server=.;User Id=sa;Password=XXX;Database=XXX;Encrypt=True;TrustServerCertificate=True;",

1.3   SqlSugarCore NuGet包升级到 5.1.4.142 + 版本

2、AutoMapper 相关

2.1 删除一个NuGet包,这个在.netcore 8.0 会自带,引用则会冲突。

 AutoMapper.Extensions.Microsoft.DependencyInjection

2.2   AutoMapper NuGet包升级到 13.0.1+ 版本

3、Jwt 相关

3.1  加密的key字符串长度有最低要求,短了会报错,以前不会

 "JwtSetting": {
   "Issuer": "jwtIssuer", //颁发者
   "Audience": "jwtAudience", //可以给哪些客户端使用
   "SecretKey": "xhuangqianmingyueguangxhuangqianmingyueguang", //加密的Key
   "Expires": 60 //默认过期分钟
 },

4、目标框架

4.1  把所有项目的目标框架改成.NET 8.0

4.2  重新生成项目,可能会报很多引用相关的错误,删除无关using 引用

5、IIS部署问题

5.1  官网下载:dotnet-hosting-8.0.2-win.exe 和 dotnet-sdk-8.0.201-win-x64.exe,在服务器上安装。

5.2  项目 web.config 配置文件 hostingModel 修改为  "OutOfProcess" 

<system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\XXXX.Core.App.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
    </system.webServer>

5.3  应用程序池 .NET CLR 版本 设为 无托管代码,模式为集成

举报

相关推荐

0 条评论