entity-framework-4 - 如何让 EF 代码首先在 `IIS AppPool\MySiteName` 下运行?

标签 entity-framework-4

我正在从 asp.net 站点学习 MVC 3。

我的 MVC 3 应用程序已经在 IIS AppPool\MySiteName 下进行了测试并且运行良好。

使用 Sql Server Management Studio,我为 IIS AppPool\MySiteName 创建了一个新帐户。

我遵循了本教程 "creating db on the fly"我得到如下错误:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Cannot open database "Movies" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\Getting Started'. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

最佳答案

那个错误是说用户 IIS APPPOOL\Getting Started 没有正确的登录凭据,您的用户名或密码不正确。为什么不向我们展示您的 web.config 文件中的连接字符串是什么样的

关于entity-framework-4 - 如何让 EF 代码首先在 `IIS AppPool\MySiteName` 下运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4731465/

相关文章:

c# - 如何对绑定(bind)到 EF EntityCollection<T> 的 WinForms DataGridView 进行排序

entity-framework - EF4 STE 包含路径....排除路径?

c# - 使用Entity Framework 4.0时如何更新不同表的相关条目?

c# - EF 中多对多连接的最佳实践

.net - 我应该更频繁地处理 EF 上下文吗?

entity-framework - 如何使用 Entity Framework 从数据库中仅更新一个模型表?

asp.net-mvc - 使用非身份 ID key 在 Code First 上插入失败

transactions - EF4 Code First、TDD、CRUD 和事务

c# - Entity Framework 查询结果

asp.net-mvc-3 - 无法将 lambda 表达式转换为类型 'string',因为它不是委托(delegate)类型