View Single Post
  #1 (permalink)  
Old October 31st, 2010, 12:11 PM
SeanCunningham SeanCunningham is offline
Registered User
Join Date: Oct 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 18 - Failed to generate a user instance of SQL Server - aspnetdb only

Once delivered via IIS, the application will successfully start up the PlanetWrox database but not the ASPNETDB database. I can navigate into the gig pics and reviews sections, but cannot log in.

When I try to log in I get the error:

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.
Connection strings from the webconfig file:

<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
<add name="PlanetWroxConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanetWrox.mdf;Integrated Security=True;User Instance=true" providerName="System.Data.SqlClient"/>
I am using Windows Vista. I built the application in Microsoft Visual Web Developer 2010 Express and have installed SQL Server 2010 Express. The application runs in the DefaultAppPool on version 4.0.