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>