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

February 13th, 2012, 09:35 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can you post the code for your connection strings in web.config?
Imar
|
|

February 13th, 2012, 09:52 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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 ?
|
|

February 13th, 2012, 09:53 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
Yeah ofcourse here it is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<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="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\PlanetWrox.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<system.web>
<pages theme="Monochrome">
<controls>
<add tagPrefix="Wrox" tagName="Banner" src="~/Controls/Banner.ascx" />
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
<buildProviders>
<add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
</buildProviders>
</compilation>
</system.web>
<system.net>
<mailSettings>
</smtp>
</mailSettings>
</system.net>
</configuration>
Last edited by Nick Makin; February 13th, 2012 at 10:24 AM..
|
|

February 13th, 2012, 10:04 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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....
Imar
|
|

February 13th, 2012, 10:25 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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
|
|

February 13th, 2012, 01:40 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
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?
Thanks,
Nick
|
|

February 13th, 2012, 01:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Can you still log in to SQL Server (at .\SqlExpress) using Management Studio?
|
Can you?
Cheers,
Imar
|
|

February 14th, 2012, 11:40 AM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
That doesent sound familiar, dont think ive used that before?
Nick
|
|

February 14th, 2012, 12:48 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
Imar
|
|

February 15th, 2012, 12:30 PM
|
|
Authorized User
|
|
Join Date: Dec 2011
Posts: 43
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Imar
Can you?
Cheers,
Imar
|
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.
Nick
|
|
 |
|