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.
<add name="Connect" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\StatisticsDiagram\StatisticsDiagram\App_Data\MyDB.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />- Andrei