Failed to generate a user instance of SQL Server due to failure in retrieving the user's local ap
This is my first time to deploy an asp.net web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be cl开发者_JAVA技巧osed"
(only in pages that try to access the database)
Help pleaseee
In IIS under Vista/Windows 7/Server 2008 OS, Select the application pool and then "advanced settings." Under "process model" find "Load User Profile" and set it to true.
SQL should now load under the default app pool account.
Try the following:
- Start IIS
- Open Application Pools by clicking on it
- Right click on DefaultAppPool and select “Select Application Pool Defaults”
- Change “Identity” property to “NetworkService”
- Save and exit IIS
You have to adjust your connection string
according to your hosting server.
Modify the below section of web.config according to SQL server user name and password
<connectionStrings>
<add name="DBName" providerName="System.Data.SqlClient"
connectionString="uid=; pwd=; database=; server=;"/>
</connectionStrings>
精彩评论