简体   繁体   English

使用 Windows10 的 IIS 上的 ASP.NET Core 应用程序不断崩溃

[英]Constant crashes of ASP.NET Core app on IIS with Windows10

We are running a web application using ASP CORE.我们正在使用 ASP CORE 运行 Web 应用程序。 Unfortunately while inspecting Event Viewer Manager I noticed weird crashes and restarts of the app.不幸的是,在检查事件查看器管理器时,我注意到应用程序出现奇怪的崩溃和重启。

Error log looks like this:错误日志如下所示:

Faulting application name: dotnet.exe, version: 1.1.0.1179, time stamp: 0x58224b03
Faulting module name: KERNELBASE.dll, version: 10.0.14393.1770, time stamp: 0x59bf2ba6
Exception code: 0xe0434352
Fault offset: 0x0000000000033c58
Faulting process id: 0x3ec4
Faulting application start time: 0x01d3885e41a55d69
Faulting application path: C:\Program Files\dotnet\dotnet.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 20b0cbe4-423e-4adf-ba0f-848a38ea967b
Faulting package full name:
Faulting package-relative application ID:

What I investigated was memory leaks of dotnet.exe process.我调查的是 dotnet.exe 进程的内存泄漏。 But it doesn't seem to be the issue since private bytes parameter doesn't rise.但这似乎不是问题,因为私有字节参数没有上升。 Here I attach the graph of 20 minutes of app runtime.在这里我附上应用程序运行时间 20 分钟的图表。 Crashes and restarts are constant and occur every 2 minutes.崩溃和重启是恒定的,每 2 分钟发生一次。

在此处输入图片说明

Have you got any ideas how can I investigate my issue?您知道如何调查我的问题吗?

Ok, I found what was causing the problem.好的,我找到了导致问题的原因。 Digging into stdout logs of application I noticed:深入研究应用程序的标准输出日志,我注意到:

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\...\wwwroot\...\...\XYZ-v.json' is denied.
at System.IO.Win32FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.Win32FileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at XYZ.Utils.Dashboard.DashboardController.SaveToFile()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()

The solution was to add full permissions for IIS user to this file.解决方案是将 IIS 用户的完全权限添加到此文件中。

Silly me :)傻我:)

可能,您可以尝试在应用程序池上启用 32 位应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM