Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 31st, 2010, 12:11 PM
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:

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.
 
Old October 31st, 2010, 12:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 1st, 2010, 11:03 AM
Registered User
 
Join Date: Oct 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
 
Old November 2nd, 2010, 03:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to generate a user instance of SQL Server naeem.net SQL Server 2005 3 December 11th, 2009 02:45 PM
Chapter 18: Getting "Failed to generate a user instance of SQL Server" error HungryCaterpillar BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 November 11th, 2009 01:56 PM
Moving AspNetDB on thte sql server bex ASP.NET 3.5 Basics 6 March 19th, 2009 04:23 AM
Failed to generate a user instance of SQL Server Qiaona Jin BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 2 January 2nd, 2009 09:17 AM
SQL Server / Login failed for user 'NT AUTHORITY ElPato ASP.NET 1.0 and 1.1 Basics 2 November 14th, 2004 10:03 AM





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