How to make EF code first run under "IIS AppPool \ MySiteName"?

I am learning MVC 3 from asp.net.

My MVC 3 has already been tested in 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 on β€œcreating db on the fly” and I got the 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. 
+3
source share
3 answers

Install Load User Profilein Truethe application pool GettingStarted.

+1
source

, , IIS APPPOOL\Getting Started , , . , web.config

+2

Listed below is all you need to do imo:

  • Create and configure a new AppPool, say, AppPoolFoo, working under the identification of a local user account, say User1
  • Configure your site in IIS to run under AppPoolFoo
  • Grant User1 appropriate rights with SQL Server Management Studio

I don’t understand if you are following these steps or have a different scenario.

+1
source

Source: https://habr.com/ru/post/1786299/


All Articles