View Single Post
  #2 (permalink)  
Old June 7th, 2013, 02:31 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Hi Rich,

You seem to be using two different versions of SQL Server: Local DB for the PlanetWroxConnectionString1 and a unnamed instance (.) for the
PlanetWroxEntities. On the last instance, you attached a database and called it PlanetWrox. Is that database pointing to the same .MDF in the site's App_Data folder?

If so; this makes sense; you can't share the MDF file like this across two instances of SQL Server. Try pointing PlanetWroxConnectionString1 to the same instance of SQL server (or let PlanetWroxEntities point to LocalDB as well) and see if that fixes it.


Imar Spaanjaars
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