一打开页面就报错,偶尔正常,系统日志中错误如下:
Application: w3wp.exe
CoreCLR Version: 4.700.20.41105
.NET Core Version: 3.1.8
Description: The process was terminated due to an internal error in the .NET Runtime at IP 69D00BE5 (69CA0000) with exit code 80131506.
在.netframework 下,直接修改webconfig文件即可,增加
<runtime>
<gcServer enabled="true"/>
<gcConcurrent enabled="true"/>
</runtime>
</configuration>
但在.netcore中,修改webconfig根本没效果,只能在工程中修改,即.csproj文件,增加如下配置:
<PropertyGroup>
<ServerGarbageCollection>false</ServerGarbageCollection>
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
</PropertyGroup>
搞定