Try Now
More in this section

Forums / Deployment / Failed to generate a user instance of SQL Server

Failed to generate a user instance of SQL Server

4 posts, 0 answered
  1. NIkhil
    NIkhil avatar
    11 posts
    13 Aug 2012
    17 Jan 2012
    Link to this post
    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.
  2. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    09 Sep 2007
    17 Jan 2012
    Link to this post
    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:


    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
    Telerik | Sitefinity CMS
  3. Jason
    Jason avatar
    8 posts
    22 Jul 2010
    01 Nov 2012 in reply to Gabe Sumner
    Link to this post
    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.
  4. Faramarz
    Faramarz avatar
    5 posts
    06 Aug 2012
    26 Aug 2013 in reply to Jason
    Link to this post

    Thanks a lot for posting this.  I've been banging my head against the wall for an hour.
4 posts, 0 answered