无法加载文件或程序集 Microsoft.AspNetCore。*

问题描述 投票:0回答:1

在运行 Dotnet 7 的服务上,会连续记录以下事件。服务进程继续运行,但没有任何作用。不接受任何请求。进程似乎处于僵尸状态。

Category: Microsoft.AspNetCore.Server.Kestrel
EventId: 0
ConnectionId: 0HMUL71ECIOGR

Unhandled exception while processing 0HMUL71ECIOGR.

Exception: 
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Http.Features, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.Http.Features, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.ProcessRequestsAsync[TContext](IHttpApplication`1 httpApplication)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection.ProcessRequestsAsync[TContext](IHttpApplication`1 httpApplication)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection`1.ExecuteAsync()

重新启动进程就恢复了,就像什么也没发生一样。

造成这种情况的根本原因是什么?

.net windows asp.net-core windows-update
1个回答
0
投票

这可能是由于 Windows Update 安装了 Dotnet 更新,通常是安全补丁。

检查事件日志(系统)中的事件 ID。 (这些将在问题开始时出现。)

Source: WindowsUpdateClient 
Task Category: Windows Update Agent

44  Windows Update Agent Windows Update started downloading an update.
43  Windows Update Agent Installation Started: Windows has started installing the following update: ...
19  Windows Update Agent Installation Successful: Windows successfully installed the following update: ...

如果是这样,可能是安装更新的原因。重新启动受影响的 dotnet 应用程序应该可以解决问题。

© www.soinside.com 2019 - 2024. All rights reserved.