p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   Chapter 14 problem (http://p2p.wrox.com/showthread.php?t=86483)

Imar February 13th, 2012 09:35 AM

Can you post the code for your connection strings in web.config?


Nick Makin February 13th, 2012 09:52 AM

Ive tried to open up the Database in Database Explorer, and it wont let me open it. Shall I delete it and re-add the database ?

Nick Makin February 13th, 2012 09:53 AM

Yeah ofcourse here it is:


<?xml version="1.0" encoding="utf-8"?>
  For more information on how to configure your ASP.NET application, please visit
    <add name="PlanetWroxConnectionString1" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanetWrox.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
    <add name="PlanetWroxEntities" connectionString="metadata=res://*/App_Code.PlanetWrox.csdl|res://*/App_Code.PlanetWrox.ssdl|res://*/App_Code.PlanetWrox.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\PlanetWrox.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <pages theme="Monochrome">
        <add tagPrefix="Wrox" tagName="Banner" src="~/Controls/Banner.ascx" />
    <compilation debug="true" targetFramework="4.0">
        <add assembly="System.Security, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Data.Entity, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.Entity.Design, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />

Imar February 13th, 2012 10:04 AM

Hmmm, odd, as it looks fine to me. Yeah, see what happens when you try to recreate them. Can you still log in to SQL Server (at .\SqlExpress) using Management Studio?

Also, you may want to edit your post and remove your Gmail account data, and change your Gmail password to avoid abuse....


Nick Makin February 13th, 2012 10:25 AM

Ha oops, thanks for that Imar, removed it!

Ill try and change the database's around and ill post back if i have any other problems,

thanks again,


Nick Makin February 13th, 2012 01:40 PM

Bit confused, gone into the Resources folder in my C drive, then into chapter 12 where the PlanetWrox database is and tried to copy the database into my App_Data folder and tried to open it and im getting the same error.

Am I going about it the wrong way?



Imar February 13th, 2012 01:52 PM


Can you still log in to SQL Server (at .\SqlExpress) using Management Studio?
Can you?



Nick Makin February 14th, 2012 11:40 AM

That doesent sound familiar, dont think ive used that before?


Imar February 14th, 2012 12:48 PM

It can be installed using the Web Platform Installer (see chapter 1). If it is installed, you'll find it in the Windows Start Menu with a name like SQL Server Management Studio.


Nick Makin February 15th, 2012 12:30 PM


Originally Posted by Imar (Post 281454)
Can you?



Yes I can Imar, but in the list of databases the PlanetWrox.mdf isnt there if that means anything? Ive tried to open that database normally from my C drive but doesent work.


All times are GMT -4. The time now is 11:17 AM.

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