0

I was trying to attach w3p process to debug on Visual Studio 2019 as Admin User but I am getting error as you do not have enough privilege to attach to process. I checked my Local policies and I don't have rights on Debug Programs.

Is there a way to use Attach to Process without access on this Policy.

  • Did you run your VS as administrator and then attach it to process? – Mr Qian Jan 15 '20 at 07:40
  • Yes running as an Administrator. Can it be due to some folder level access as well or we need to have access on Debug programs in Local Security Policy – Mohd Kashif Jan 15 '20 at 07:45
  • If you are not an administrator account, you can try to add your current domain by `Start `-->`Control Panel`-->`Administrative tools`-->`Local Security Policy`-->`Local Policies`-->`User Rights Assignment`-->`Debug programs`. Second, follow [this document](https://learn.microsoft.com/en-us/visualstudio/debugger/unable-to-attach-to-the-process?view=vs-2019) to change. Third , you can try to move this application to a public folder on your local system to make sure it can access. – Mr Qian Jan 15 '20 at 08:24
  • And l am afraid you cannot attach it to process without administrator permission.See [this](https://stackoverflow.com/questions/51418788/attach-debugger-to-local-iis-without-administrator-permission). – Mr Qian Jan 15 '20 at 08:45
  • Thanks Perry. I changed the process to run under my account now which was running under network service by default. I am able to debug now. – Mohd Kashif Jan 15 '20 at 12:29

1 Answers1

0

Is there a way to use Attach to Process without access on this Policy.

l am afraid that you cannot use Attach to Process without access on the Policy and you can refer the info from here.

To troubleshoot your issue, you can try these:

1) add your current domain by Start -->Control Panel-->Administrative tools-->Local Security Policy-->Local Policies-->User Rights Assignment-->Debug programs.

2) make sure that the local security setting selects Classic( Start -->Control Panel-->Administrative tools-->Local Security Policy-->Local Policies-->Security Options-->User Rights Assignment-->double-click Network access: Sharing and security model for local accounts.)

More info you can refer to this.

3) If the w3p process is from shared network, please insure the current account is on the Shared LAN and make sure that your account can access network and this process.

4) If the w3p application is on your lcoal system, please move this application to a public folder such as D disk not a system disk to make sure it can access.

Hope it could help you.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41