9

当我在 sql server 2005 上运行时:

EXEC sp_grantlogin "IIS APPPOOL\DefaultAppPool"

我得到错误:

Msg 15401, Level 11, State 1, Procedure sp_grantlogin, Line 49
Windows NT user or group 'IIS APPPOOL\DefaultAppPool' not found. Check the name again.

我怎样才能解决这个问题?

4

4 回答 4

8

这对我有用

CREATE LOGIN [IIS APPPOOL\MyAppPool] FROM WINDOWS;
CREATE USER MyAppPoolUser FOR LOGIN [IIS APPPOOL\MyAppPool];
于 2016-04-27T07:58:17.960 回答
5

You need to ensure that there is a Windows account called IIS APPPOOL\DefaultAppPool on the machine. Run Computer Management on the machine,go to Local Users and Groups, and look at the properties in IIS_IUSRS.

If there is no account there called IIS APPOOL\DefaultAppPool then that is why you cannot add a login to SQL Server. You will only have this account on your SQL Server machine if you are also running IIS on that machine, as IIS APPPOOL\DefaultAppPool is a local account.

This link http://forums.iis.net/t/1174325.aspx seems to be very similar to your problem. There are some tips on how to solve the problem, including one at the very end which looks important.

于 2012-07-29T23:54:12.057 回答
2

对于我的 IIS 7.5 开发盒上的延迟设置,我使用BUILTIN\IIS_IUSRS了 application pool identity 而不是IIS APPPOOL\DefaultAppPool

由于(动态)应用程序池身份用户始终是 Group 的成员IIS_IUSRS,因此如果您重命名应用程序池或使用不同的应用程序池,则不会破坏 SQL 权限。

参考,使用 BUILTIN\Group 授予对预定义 Windows NT 组的访问权限:http: //support.microsoft.com/kb/216808

于 2014-03-10T19:53:33.103 回答
0

安装 SQL 等后我有同样的错误消息。我发现我实际上没有IIS启用/安装Windows Programs and Features.

搜索Turn Windows features on or off

支票IIS - Internet Information Services已打勾

点击OK

重新运行 SQL 脚本现在应该完成了。

于 2016-11-30T17:40:29.227 回答