Login failed for user #39;IIS APPPOOLmyAppPool(用户 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_datareader 和 db_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 登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:用户 'IIS APPPOOLmyAppPool 登录失败
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
