Failed to generate a user instance of SQL Server

Posted by Community Admin on 05-Aug-2018 14:31

Failed to generate a user instance of SQL Server

All Replies

Posted by Community Admin on 17-Jan-2012 00:00

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.

I am Using SQL Express Not SQL Server in the Development mode. In the DEvelopment mode its working fine. After giving publish i am getting this issue how to resolve it.

Posted by Community Admin on 17-Jan-2012 00:00

How are you running the website?  Are you using Sitefinity's Project Manager or Visual Studio.  In these 2 scenarios, it's rare to receive this error.  If you do get the error in these scenarios, then it can normally be fixed like this:

http://blog.williamhilsum.com/2011/05/failed-to-generate-user-instance-of-sql.html 

On the other hand, if you're running the website using IIS then you probably also choose to use a local-attached database during Sitefinity's initial setup instead of providing a database hostname/username/password.  Local attached databases create a user instance for the database.  IIS, by default, runs as a special user and this user doesn't have these permissions.

I've never discovered an easy way to fix this.  Instead, when using IIS, I explicitly provide a hostname (localhost\sqlexpress) and a database username & password.

Gabe Sumner
Evangelist
Telerik | Sitefinity CMS

Posted by Community Admin on 01-Nov-2012 00:00

This error can be recreated by first creating the site via the Project Manager, then following the setup instructions "Running a project on IIS 7.0 or IIS 7.5" in the Installation and Administration Guide. If you're using Microsoft SQL Server Express, somewhere between steps 11 and 14 it should note for you to open the application pool's Advanced Settings and set the "Load User Profile" option to "True".

This fixes the issue for us, your mileage may vary.

Posted by Community Admin on 26-Aug-2013 00:00

Jason,

Thanks a lot for posting this.  I've been banging my head against the wall for an hour.

This thread is closed