More in this section

Forums / Developing with Sitefinity / Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path.

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path.

3 posts, 0 answered
  1. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    15 Jul 2009
    Link to this post

    I did something really weird.
    Not even sure how much it is related to sitefinity.

    I was writing some code and cause my application to crash, probably wrote some strange data into my database. My app was using its own local file as the database. (sitefinity.mdf)
    When the application crashed i started getting some strange errors 505. I could not get the app to start again so i played with iis a little.
    At this point i started to get the "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path." error. 
    I assumed that i somehow corrupted the db. So i found my backup copy of the application and tried that one.
    Still the same error. Now that is strange since earlier that day it worked fine.

    At this point i started getting suspicious and tried a different application. One that happened to be using a database i created within my sql server instance. That app worked fine. No problem at all.

    At this point i unzipped a blank project and tried to create a new app again using the sitefinity.mdf file. Can't do it. Get the error again.

    Don’t know what’s going on here, can’t run any app that uses the sitefinity.mdf file but can run one that has an sql database.

    Anyone else seen this problem before?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Jul 2009
    Link to this post
    Hello Andrew,

    Possible reason could be if the mdf database was not detached. Try detach  and attach the database again. Make sure you have closed all connections to the SQL Express before proceeding.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    17 Jul 2009
    Link to this post
    Not sure what the problem was.
    After a whole day of trying to fix it I managed to create a new project that actually worked and copied all my code to this new project.

    Now it appears to be working.
    But i think from now on i might stick to using the sql database even for the dev projects.
    No more mdfs for me i think.
Register for webinar
3 posts, 0 answered