I launch a pool for mvc applications on IIS. Everything worked. But I added EntityFramework and mssql server to the application. There was an error. I installed mssqllocaldb 12 version of mssql server. And created an instance with the same name as in the application. But still there was an error. Here is the text of the error:

There was a network or instance error while connecting to SQL Server. Server not found or unavailable. Ensure that the instance name is correct and that remote connections are allowed on SQL Server. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Failed to get the path to the local application data. Most likely, the user profile is not loaded. If the LocalDB instance is running under IIS, check if the profile loading is enabled for the current user.)

Maybe my profile loading is not enabled for the current user. But I do not even know what it is. Please tell me how to fix this situation.

  • Let's start with simple questions for a hundred rubles. You do not write anything about the fact that you added connection string. Added? If yes - give it in the text of the question. - AK
  • @AK Of course, the string is there. This program works for me if I run it not from the pool but simply from visual studio. <add name="Connect" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\StatisticsDiagram\StatisticsDiagram\App_Data\MyDB.mdf;Integrated Security=True" providerName="System.Data.SqlClient" /> - Andrei
  • So after all LocalDB is not designed to work in the services of the same ... - Pavel Mayorov
  • "Maybe my profile loading is not enabled for the current user." hmm .. well, try to turn it on. The pool works from some user and in the properties of the pool there is an option that includes loading the profile of this user. - i-one
  • @PavelMayorov, I do not know. Therefore, I asked a question. Please tell me how it should work then? - Andrei

0