简体   繁体   English

无法附加到 VS 2022 中的 w3wp 进程

[英]Cannot attach to w3wp process in VS 2022

I have web app running locally in IIS. App of Net Framework 4.7.2.我有 web 应用程序在 IIS 中本地运行。Net Framework 4.7.2 的应用程序。 When I tried "Attach to Process" for w3wp process in Visual studio I am unable to do so.当我尝试在 Visual Studio 中为 w3wp 进程“附加到进程”时,我无法这样做。 Visual Studio is running under Administrator account. Visual Studio 在管理员帐户下运行。 Things I tried:我尝试过的事情:

  1. Restart of IIS and VS in different sequence.以不同的顺序重启 IIS 和 VS。
  2. Setting "Enable 32-bit Applications" flag on app pool in IIS to true将 IIS 中应用程序池的“启用 32 位应用程序”标志设置为 true
  3. Tried to run process monitor to see if there would be errors.尝试运行进程监视器以查看是否会出现错误。 Nope, no errors.不,没有错误。
  4. Tried manually set type of app in "Attach to" combobox to various types with same results.尝试将“附加到”combobox 中的应用程序类型手动设置为具有相同结果的各种类型。 Types tried: Managed 4.x, with and without Compatibility mode, Managed(Native compilation), Native.尝试过的类型:Managed 4.x,带和不带兼容模式,Managed(本机编译),Native。
  5. Tried Visual Studio repair - still having issue.尝试了 Visual Studio 修复 - 仍然有问题。
  6. Created brand new web app.Net Framework 4.7.2, deployed it under IIS and tried to attach to the w3wp process and got same issue.创建全新的 web app.Net Framework 4.7.2,将其部署在 IIS 下并尝试附加到 w3wp 进程并遇到同样的问题。

Things I noticed:我注意到的事情:

  1. When I tried to attached to 64 version of the w3wp the type is "Managed Net 4, x64" and I am getting "Unable connect to the process" message with justification: VS must run as administrator.当我尝试连接到 64 位版本的 w3wp 时,类型是“Managed Net 4, x64”,我收到“无法连接到进程”的消息,理由是:VS 必须以管理员身份运行。 Funny thing: VS IS running as administrator.有趣的是:VS 是以管理员身份运行的。
  2. When I turn 32-bit application flag on I am getting type as x86 and plain "Access denied".当我打开 32 位应用程序标志时,我得到的类型为 x86 和普通的“访问被拒绝”。 Even if restart IIS and try to access the app to start new w3wp process.即使重新启动 IIS 并尝试访问该应用程序以启动新的 w3wp 进程。 I think it should be: "Managed Net 4, x86", but I am not 100% sure.我认为应该是:“Managed Net 4, x86”,但我不是 100% 确定。

At this point I am out of ideas.在这一点上,我没有想法。 Any help would greatly appreciated任何帮助将不胜感激

UPDATE.更新。 I noticed, when I turn on 32bit applications on app pool in IIS I am getting following error in Event Viewer: "The description for Event ID 0 from source .NET Runtime cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer."我注意到,当我在 IIS 中打开应用程序池上的 32 位应用程序时,我在事件查看器中收到以下错误:“无法找到来自源 .NET 运行时的事件 ID 0 的描述。引发此事件的组件未安装在您的本地计算机或安装已损坏。您可以在本地计算机上安装或修复该组件。”

Turned out corrupted Avecto installation was the culprit.原来损坏的 Avecto 安装是罪魁祸首。 Reinstalling offending software resolved the issue.重新安装有问题的软件解决了这个问题。 Live and learn.活到老,学到老。 At least I lived.:)至少我还活着。:)

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

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