问题
To be able to attach to w3wp.exe
Visual Studio wants to have elevated permissions so I either have to start VS as admin or add my local user to the Administrators
group. Is there any other way, another group etc, to be able to attach to w3wp.exe
without having elevated permissions?
回答1:
Attach debugger to local IIS without administrator permission
I am afraid you can NOT do that without administrator permission.
According to the ASP.NET Debugging: System Requirements:
If you change the ASP.NET worker process to run under your own user account, you do not have to be an Administrator on the server that is running IIS
And Using IIS with Visual Studio:
Disadvantages of Using IIS as a Development Web Server Using IIS as a development server can require more setup and configuration tasks in order to work with Visual Studio than using IIS Express, including the following:
- You must run Visual Studio as an administrator in order to work with IIS.
Hope this helps.
回答2:
You can run the process under your own user account.
https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-run-the-worker-process-under-a-user-account
来源:https://stackoverflow.com/questions/51418788/attach-debugger-to-local-iis-without-administrator-permission