I have web app running locally in IIS. App of 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 is running under Administrator account. Things I tried:
- Restart of IIS and VS in different sequence.
- Setting "Enable 32-bit Applications" flag on app pool in IIS to true
- Tried to run process monitor to see if there would be errors. Nope, no errors.
- Tried manually set type of app in "Attach to" combobox to various types with same results. Types tried: Managed 4.x, with and without Compatibility mode, Managed(Native compilation), Native.
- Tried Visual Studio repair – still having issue.
- 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.
Things I noticed:
- 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. Funny thing: VS IS running as administrator.
- When I turn 32-bit application flag on I am getting type as x86 and plain "Access denied". Even if restart IIS and try to access the app to start new w3wp process. I think it should be: "Managed Net 4, x86", but I am not 100% sure.
At this point I am out of ideas. Any help would greatly appreciated
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."
Turned out corrupted Avecto installation was the culprit. Reinstalling offending software resolved the issue. Live and learn. At least I lived.:)
Answered By – fatherOfWine
Answer Checked By – Timothy Miller (BugsFixing Admin)