visual-studio-2010 - 为什么 IIS 应用程序需要提升的权限才能附加到?

标签 visual-studio-2010 iis

我遇到了这个问题:

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/

相关文章:

c++ - 构建发布/调试 VS2010 C++

c++ - 视觉 C++ : Unable to invoke method from another class

c# - 在 Windows Phone 7 (WP7) 中以编程方式创建按钮

c# - IIS Apppool 断开与 WCF 服务的连接

web-services - 仅将流量限制为页面的 SSL 版本

sql-server - 如何通过 IIS 启动 SQL Server LocalDB

c++ - IIS 调用 OLEDB API 失败

c++ - VS2010 : Collapse code regions only works for . c 文件,不适用于 .cpp 文件

iis - 无需 Visual Studio 即可将 Web 部署到 IIS

c# - 如何通过 web.config 重定向 ASP.NET