1

I am unable to attach the debug process in visual studio 2019 , I am getting following error message - unable to attach to process. access is denied Kindly help me.

I have already tried following

1. I opened my VS 2019 in admin mode
2. I have tried 
From the Start menu, choose Control Panel.
In Control Panel, double-click Administrative tools.
In the Administrative tools window, double-click Local Security Policy.
In the Local Security Policy window, select Local Policies.
In the Policies column, double-click Network access: Sharing and security model for local accounts.
In the Network access: Sharing and security model for local accounts dialog box, change the local security setting to Classic, and click OK.

But there is no luck, still I am getting Access denied error Please suggest me This is my setting - enter image description here

Kumar
  • 65
  • 2
  • 9
  • Have you checked this?: "Try to check Local Security Policy, make sure that Administrators(or your user) have "Debug Programs" permission (from Security Settings -> Local Policies -> User Rights Assignment)." (https://stackoverflow.com/questions/3996139/unable-to-attach-to-the-process/16475273) – artist_dev Aug 20 '20 at 23:23
  • I have verified - Try to check Local Security Policy, make sure that Administrators(or your user) have "Debug Programs" permission (from Security Settings -> Local Policies -> User Rights Assignment). I have already have this rights – Kumar Aug 21 '20 at 00:35
  • I have added the image of my system setting, Please help me – Kumar Aug 21 '20 at 00:50
  • What's the process you're trying to attach to? Maybe it's running under a different user, or as Administrator. If so you should also run Visual Studio under the same user or/and as Administrator – Claudiu Guiman Aug 21 '20 at 02:49

1 Answers1

4

I am going to assume that you are trying to attach to 'w3wp.exe'

Not sure why or how it fixed my problem but here is what worked for me:

After i've tried everything (giving 'Everyone' permission to multiple places, local policies etc), i remembered that I had recently changed a configuration in ISS's Application pool.

More specifically, setting the 'Enable 32-bit Applications' to 'False' caused the problem. After i changed this option to 'True', i was able to attach 'w3wp' successfully.

enter image description here

Mario
  • 767
  • 1
  • 14
  • 42