You get a bonus - 1 coin for daily activity. Now you have 1 coin

IIS: ASP.NET fails to connect with the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path..."

Practice



If, when connecting from ASP.NET to MS SQL Server from IIS 7 on a server running Microsoft Windows Server 2008 (R2), the following error occurs:

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 closed.


Then do the following:

1) Open the IIS snap-in (Start -> Administrative Tools -> Internet Information Services (IIS) Manager)

2) Go to "Application Pools"

3) Select the required application and on the right panel choose "Advanced Settings"

4) Go to the "Process Model" section and change the "Identity" option to "Network service" or to "Custom account" (for the latter option you need to enter the username and password under which the application should run).

After this, the error should disappear

Applies to: Windows Server 2008 R2; MS SQL Server 200x; IIS 7

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)