How can I debug a local IIS service with Visual Studio running as a non-Administrator user?

我的梦境 提交于 2019-12-01 15:07:29

It looks like that for now, the answer is you can't.

I will delete this if a method or solution comes along.

You could use IIS Express which doesn't require admin privileges. Don't think there's a stand-alone download but you can get it as part of Web Matrix here: http://www.microsoft.com/web/webmatrix/download/

I've never tried this, but it might be worth a shot.

While logged in as an administrator, you could change the identity under which the service and/or the application pools run. Make them run under the same non-administrator account you normally use. Then when Visual Studio attempts to attach to the process, the security context will match between the debugger and the process being debugged.

I think you'd only need to change the identity under which your application pool runs.

Here's some more detail from James Kovacs' Weblog: Debugging as a Non-Admin

Is there already a website created within IIS for your project? Writing to the IIS metabase does require admin access. If you setup the website as an admin you may be able to debug it as a non-admin. One thing to try/test is to just point IIS at your website's folder and get it running, then use Visual Studio to do a process attach to the w3wp process.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!