用户 'IIS APPPOOLmyAppPool 登录失败 [英] Login failed for user 'IIS APPPOOLmyAppPool

查看:21
本文介绍了用户 'IIS APPPOOLmyAppPool 登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误消息:

无法打开登录请求的数据库SmallBakery".登录失败.用户 'IIS APPPOOLMyAppPool' 登录失败

Cannot open database "SmallBakery" requested by the login. The login failed. Login failed for user 'IIS APPPOOLMyAppPool'

如何纠正这个问题?我正在使用 windows 7 企业版和 Sql server 2012.

How can correct this? I am using windows 7 Enterprise Edition and Sql server 2012.

推荐答案

如果你不改变,每个应用程序池都有它自己的身份.在您的情况下,只需使用 SQL Management Studio 将一个名为 IIS APPPOOLMyAppPool 的新用户添加到您的数据库 SmallBakery.您可以在数据库的安全/用户"子节点中找到用户列表.这应该看起来像这样:

If you don't change, each app pool has it's own identity. In your case, just add a new user to your database SmallBakery with the name IIS APPPOOLMyAppPool using SQL Management Studio. You find the users list in the "Security/Users" subnode of your database. This should look something like that:

为了测试,让用户成为 db_owner 角色的成员.如果可行,请移除此角色,让它成为 db_datareaderdb_datawriter 的成员.

For testing, let the user be member of the db_owner role. If that works, remove this role and just let it be member of db_datareader and db_datawriter.

这样,每个应用程序池(可能是每个网站,如果它们都使用自己的应用程序池)只能访问相应的数据库.

This way, each app pool (perhaps each website, if they all use their own app pool) only has access to the corresponding database.

这篇关于用户 'IIS APPPOOLmyAppPool 登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆