Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2011, 07:58 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
Default Problem using SQL Server Express 2008

Imar

I am using SQL Server Express 2008

I have followed the steps on page 406 ensuring I have the correct permissions.

I have tried both versions of PlanetWrox.mdf, the enterprise version and the express version.

When I drag and drop either of them into the App_Data directory of my brand new project and double click on it in Visual Studio 2010 Professional, as instructed in the Try It Out step 4 on page 407, I get this error message:

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.

I was successful connecting another database on this instance of SQL Server Express 2008 to Visual Studio using this connection string
<add name="TrackerConnectionString" connectionString="Data Source=localhost,3432;Initial Catalog=Tracker;Integrated Security=True;MultipleActiveResultSets=true;" providerName="System.Data.SqlClient"/>

Any help you could provide would be appreciated.
Reply With Quote
  #2 (permalink)  
Old August 19th, 2011, 07:23 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

You may want to take a look here:

Failed to generate user instance of SQL Server
http://social.msdn.microsoft.com/For...5-cac99740949b

Deleting the user folder mentioned in the MSDN post seems to have helped others in the past.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
floridaguy (August 19th, 2011)
  #3 (permalink)  
Old August 19th, 2011, 08:13 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
Default

When I follow the steps you describe here:
Chapter 12 Can't access PlanetWrox.mdf

I changed "SQLEXPRESS" to "localhost,3432" under Tools | Options | Database Tools | Data Connections since that is what I use in the connection string for the database that works on my local instance of SQL Server Express 2008

Then I get a different error message:
"Connections to SQL Server database files (.mdf) require SQL Server 2005 Express or SQL Server 2008 Express to be installed and running on the local
computer. The current version of SQL Server Express can be downloaded at the following URL: http://go.microsoft.com/fwlink/?LinkId=125883"

Does this help you help me at all?
Reply With Quote
  #4 (permalink)  
Old August 19th, 2011, 09:02 AM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
Default

Well, it is working now.

I changed the SQL Server logon in services to local and I deleted the
C:\Documents and Settings\USERNAME\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS
folder as you suggested.

I don't know if both steps were required or if I could have just deleted the folder to solve the problem.

Thanks for your help
Reply With Quote
  #5 (permalink)  
Old August 19th, 2011, 09:35 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Great, glad it's working and thanks for the follow up.

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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronization between SQL 2008 Express on local machine and SQL hosting server avidan ASP.NET 4 General Discussion 0 December 29th, 2010 12:31 PM
Anyone tested the HR appl code on VWD Express Edition & SQL server Exp 2008 seemashah BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 July 27th, 2010 02:43 PM
SQL Server 2008 vs Express ewingf BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 May 20th, 2010 04:52 PM
Help With Visual Studio 2008 & SQL Server 2005 Express Rambo Visual Studio 2008 3 December 21st, 2009 12:08 PM
Installing SQL Server 2008 Express Edition with Tools Kevin7777 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 March 8th, 2009 05:14 AM



All times are GMT -4. The time now is 06:30 AM.


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