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 登录失败
基础教程推荐
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 将数据集转换为列表 2022-01-01
