如何使 EF 代码首先在“IIS AppPool\MySiteName”下工作?
我正在从 asp.net 网站学习 MVC 3。
我的 MVC 3 应用程序已经在 IIS AppPool\MySiteName
下进行了测试,并且运行良好。
使用 Sql Server Management Studio,我为 IIS AppPool\MySiteName
创建了一个新帐户。
我按照本教程“动态创建数据库”,我得到一个错误,如下所示:
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.
I am learning MVC 3 from asp.net site.
My MVC 3 application already has been tested under IIS AppPool\MySiteName
and it works well.
Using Sql Server Management Studio, I created a new account for IIS AppPool\MySiteName
.
I followed this tutorial "creating db on the fly" and I got an error as follows:
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该错误表明用户 IIS APPPOOL\Getting Started 没有正确的登录凭据,您的用户名或密码不正确。为什么不向我们展示 web.config 文件中的连接字符串是什么样的
Well that error is saying that the user IIS APPPOOL\Getting Started doesn't have the proper login credentials, either your username or password is incorrect. Why not show us what the connection string looks like in your web.config file
在我看来,您应该做以下事情:
比如说AppPoolFoo,在
本地用户帐户的身份,
说 User1
在AppPoolFoo下
SQL Server Management Studio
我不清楚您是否遵循了这些步骤,或者有不同的情况。
The following things is all you should have to do imo:
say AppPoolFoo, running under the
identity of a local user account,
say User1
under AppPoolFoo
SQL Server Management Studio
It's unclear to me whether you followed these steps, or have a different scenario.
在应用程序池
GettingStarted
上将Load User Profile
设置为True
。Set
Load User Profile
toTrue
on the application poolGettingStarted
.