Error on User Instance of SQL Server 2005 Express

Last post 05-16-2008 11:40 AM by wonjartran. 4 replies.

Sort Posts:

  • Error on User Instance of SQL Server 2005 Express

    05-15-2008, 3:45 PM

    Have downloaded VS 2008 Express, SQL Server 2005 Express, and ASP.net Data Access Tutorials 1.  After creating a new web site
    for the Data Access Tutorial 1, I also created the Northwind database in SQL Server 2005 Express by using the instnwnd.sql downloaded.
    I tried to run the aspx pages in the Data Access Tutorial 1 website .  All aspx pages returned the following error msg.    

    Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

     Reviewing the Database Explorer showed there are a NORTHWIND.MDF and a SqlExpress.Northwind.dbo.  I also created another basic data access
    website to display the Customers table of the SqlExpress.Northwind database.  This website worked fine after I selected mixed authentication mode. 

    The connection string of the SQL datasource for the ASP.net DataAccess Tutorial 1 is shown below. 

    How do I solve the User Instance error for the SQL Server 2005 Express?  I kind of remember this website worked fine when I first created it as a 'File System' website with Windows authentication mode for SQL Server 2005 Express.

    Jeffrey 

    <connectionStrings>

    <add name="NORTHWNDConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

    </connectionStrings>

  • Re: Error on User Instance of SQL Server 2005 Express

    05-15-2008, 4:24 PM
    • Loading...
    • kamii47
    • Joined on 05-26-2005, 12:04 PM
    • Karachi, Pakistan
    • Posts 1,522
    Kamran Shahid(MCSD.NET,MCPD.net[web])
    Sr. Software Engineer
    Netprosys Inc.
    www.netprosys.com

    Remember to click "Mark as Answer" on the post that helps U
  • Re: Error on User Instance of SQL Server 2005 Express

    05-15-2008, 4:37 PM
    • Loading...
    • Stevishere
    • Joined on 05-22-2007, 1:43 PM
    • Ann Arbor, MI
    • Posts 158

    What are your authentication settings in your web.config file in the folder of your application?

    Steve Holzer
    HelpMe@Em8s.net
    www.Em8s.net

    Why don't computers do what I want them to do instead of....what I tell them to do!?!?!?

    Click "Mark as Answer" on the post that helped you to help future readers.

  • Re: Error on User Instance of SQL Server 2005 Express

    05-15-2008, 9:07 PM

     To the best of my knowledge, the error has something to with the Northwind.mdf in App-Data folder, the so-called
    user instance.  Am I right?  I kind of remember we can get rid of the Northwind.mdf in the App_Data folder and create
    a new database connection to the Northwind database in the Management Studio.  The new aspx page has worked fine before. 

    My question now is why we want to use user instance or database in App_Data folder?  Any advantage?  Where can I
    read more information about User Instance?

    TIA,
    Jeffrey

  • Re: Error on User Instance of SQL Server 2005 Express

    05-16-2008, 11:40 AM
    Answer

    I changed the Connection String in web.config to the standard database connection to the local SQLExpress.
    The DataAccessTutorial 1 website now runs very well.

Page 1 of 1 (5 items)