我遇到了这个问题:
Visual Studio requires elevated permissions in Windows 7
但我对那里的任何答案都不太满意,所以我想知道是否有人可以扩展替代解决方案。
设置
- dev box 正在运行 server 2008
- Visual Studio 2010
- IIS 7
为了附加到在 IIS 下运行的进程,我被告知我需要以管理员身份运行 Visual Studio。如果我这样做,每当我编辑文件并将文件 checkin 源代码管理时,其他用户(不是管理员)都无法编辑该文件,因为 FILE 现在需要提升权限才能编辑!造成巨大的麻烦,所以基本上以管理员身份运行 VS 似乎不是一种选择。
有人有其他选择吗?
最佳答案
附加到在不同用户凭据或更高完整性级别下运行的进程需要应用程序在以管理员身份运行时获得的 SE_DEBUG 权限。您的 IIS AppPool 很可能未配置为在您的帐户下运行,因此需要提升权限。
从 Windows Vista 开始,SE_DEBUG 权限对于未以管理员身份运行(或更准确地说,未以高完整性级别运行)的进程禁用。
来自 MSDN :
Certain administrative Windows privileges can be assigned to an access token only with at least a high integrity level. If the access token integrity level is less than high, then specific administrative privileges are not allowed and are removed from the access token. The administrative privileges associated with a high integrity level are:
...
SE_DEBUG_PRIVILEGE
...
从here :
SeDebugPrivilege - Required to debug and adjust the memory of a process owned by another account. User Right: Debug programs.
关于visual-studio-2010 - 为什么 IIS 应用程序需要提升的权限才能附加到?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12820888/