授予 SQL 服务器:应用程序池或 IUSR?

grant to SQL server: application pool or IUSR?

我在 SQL 服务器和 IIS 之间的连接有问题。我找到了 this Q/A 。接受的解决方案说 IIS APPPOOL\YourAppPoolName 应该被授予 SQL 服务器。但是,我已将登录名添加到 SQL 服务器,名称为 NT Authority/IUSR,并且在用户映射中,我将此登录名映射到所需的数据库并且它有效。

A​​pplicationPoolIdentity 和 IUSR 身份有什么区别? IUSR 或 APPPOOL 之间是否存在任何安全或性能差异?

IUSR 帐户是每个服务器的,ApplicationPoolIdentity 是每个应用程序池的。

通过授予 IUSR 帐户访问您的数据库的权限,您可以使用该帐户访问来自该服务器 运行 的所有网站。使用 ApplicationPoolIdentity 时,您为每个应用程序授予访问权限 pool/website.

所以区别仅在于安全的粒度。