The Just-In-Time debugger was launched without necessary security permission

假如想象 提交于 2019-11-30 06:27:00
mapache

I don't know if your problem had the same cause, but I got this error when trying to debug my app (just pressing F5).

We got crazy trying to figure why the w3wp.exe was failing with this error when minutes before it was running fine.

After some investigation we realized that the real problem was in the code of the global.asax: it was throwing an stack overflow exception (pretty ironic for answering here) and that was crashing the w3wp.exe process before VS could attach it to begin debug.

Fixing the buggy code made the VS to run nicely again.

I see the question is from long ago, but I hope it helps somebody.

To solve this issue, let the dialog help you. Agree to launch an elevated debugger and debug your problem. You probably have some sort of configuration problem. Your real problem isn't whether or not the debugger is elevated, it's the fact you need a debugger at all. In other words the first sentence on the dialog is "you have a problem." All the other sentences are "I would like to help you with that problem; is that cool with you?"

If you usually attach to process and debug but you can't (because you can't get the app to successfully run), run the app via Visual Studio and it'll break and show you the exception cause in some detail.

I believe an update to the latest version of VS and .NET Core 2.1 is what caused this for me.

Then for the first time, I noticed this setting. Setting it to 'Enabled' fixed it for me.

Please check for System.Diagnostics.Debugger.Launch(); or Debugger.Launch(); in the cs file. Commenting the code, starting the application worked fine for me.!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!