Unable to create instance of SQL Server user due to failure to get user local ap

This is my first time deploying an asp.net website. Everything works fine on my local computer, but when I published the website on the remote computer, I got the error message "Failed to generate a user instance of SQL Server due to failure in retrieving the user local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed"

(only on pages trying to access the database)

Help me please.

+6
source share
3 answers

In IIS under Vista / Windows 7 / Server 2008 OS, select the application pool and then “advanced settings”. In the "Process Model" section, find "Download User Profile" and set it to "true."

SQL should now boot under the default application pool account.

+21
source

Try the following:

  • Launch IIS
  • Open application pools by clicking on it.
  • Right-click DefaultAppPool and select "Select Application Pool Default Values"
  • Change the "Identity" property to "NetworkService"
  • Save and exit IIS
+1
source

You must configure the connection string to suit your hosting server.

Change the web.config section below to match the SQL server user name and password

 <connectionStrings> <add name="DBName" providerName="System.Data.SqlClient" connectionString="uid=; pwd=; database=; server=;"/> </connectionStrings> 
0
source

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


All Articles