p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 (http://p2p.wrox.com/forumdisplay.php?f=389)
-   -   Chapter 18 - Failed to generate a user instance of SQL Server - aspnetdb only (http://p2p.wrox.com/showthread.php?t=81435)

SeanCunningham October 31st, 2010 12:11 PM

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:

Quote:

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:

Code:

<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.

Imar October 31st, 2010 12:51 PM

Hi there.
Quote:

and have installed SQL Server 2010 Express.
That doesn't exist, so I assume you're using SQL Server 2008?

Try removing the User Instance attribute from the web.config or attach the databases to SQL Server and modify your connection strings as explained in Appendix B.

Alternatively, take a look at existing posts on this subject: http://p2p.wrox.com/search.php?searchid=305747

Hope this helps,

Imar

SeanCunningham November 1st, 2010 11:03 AM

SQL Server 2008, yes sorry.

I've tried the things you mentioned and messed around with a few other things in another thread that reported the same error message. I get errors trying to attach the DBs as well.

Since I've pulled the aspnet user tables into my main database anyway on the project I'm now working on, as you discuss in Appendix B (very useful, by the way, thanks for including that), I think I can put this down to something silly Vista is doing and not worry about it.

Thanks for the quick response.

Imar November 2nd, 2010 03:55 AM

You're welcome, and good to hear you can continue. Have fun with the rest of the book.

Cheers,

Imar


All times are GMT -4. The time now is 10:57 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.