gpt4 book ai didi

c# - KeyVaultClient 在调试时随机抛出 FatalExecutionEngineError

转载 作者:太空宇宙 更新时间:2023-11-03 12:01:26 26 4
gpt4 key购买 nike

当我调试 ASP.NET MVC 应用程序时,KeyVaultClient 随机抛出异常:

Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0x59eab403, on thread 0x6098. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.'

我使用:

  • nuget Microsoft.Azure.KeyVault 3.0.3
  • Visual Studio 2019 专业版 16.1.4
  • Microsoft.AspNet.WebApi 5.2.3
  • 没有托管兼容模式

我熟悉了this question没有任何帮助发生。


编辑

启用托管兼容模式后,我得到了稍微不同的错误:

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'C:\Program Files (x86)\IIS Express\iisexpress.exe'. Additional Information: The runtime has encountered a fatal error. The address of the error was at 0x6c0db403, on thread 0x54a8. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack. occurred

最佳答案

来自 https://devblogs.microsoft.com/devops/switching-to-managed-compatibility-mode-in-visual-studio-2013/

New managed debug engine that provides us the ability to more rapidly add new features compared to the older implementation. This can be seen by the number of features introduced in Visual Studio 2013 after only a single year including Managed Return Values, .NET 64-bit Edit and Continue, Async Callstacks Enhancements, and Improved Tasks Window to name a few. Unfortunately, there are still a couple scenarios that are not supported yet with the new debug engine, so in these cases you will have to switch back to the legacy engine.


您遇到的错误是因为新调试引擎不支持的问题。

请尝试以下设置,看看是否仍然出现同样的错误。

  • 要全局切换回旧版调试引擎,请选择工具/选项

  • 然后在“调试”/“常规”选项卡上选中“使用托管兼容模式”。

全局选项将强制使用遗留引擎进行任何启动或附加。

希望对您有所帮助。

关于c# - KeyVaultClient 在调试时随机抛出 FatalExecutionEngineError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56846918/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com