Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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
 
Old March 10th, 2014, 01:07 PM
Registered User
 
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default aspnetdb in SQL2005 Express

my webhost only hosts MS SQL 2005. I am following the book in Chapter 16 and trying to create a login. When the Aspnetdb.mdf is created at Page 584 Step 8, I can only get it to be created in SQL 2008. In Tools/Options I have the Data Connection defined as an instance of SQL 2005 Express. If I ad a new database to my website it comes in as 2005. But the Aspnetdb always is created in 2008. Is there anyway to create the Aspnetdb.mdf in 2005? Thanks.
 
Old March 10th, 2014, 02:37 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,

What connection string is your web.config pointing to? Maybe the connection string still points to your 2008 instance?

Quote:
my webhost only hosts MS SQL 2005.
That's 9 years old. Maybe it's time to look at a new host if the can't upgrade? ;-)

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!
 
Old March 10th, 2014, 03:03 PM
Registered User
 
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

the only connection string in the web.config is for the PlanetWrox database and it is using the 2008 instance because the database from Wrox in 2008.
 
Old March 10th, 2014, 03:44 PM
Registered User
 
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Imar, I just realized I am in the wrong forum. I am using your book for Asp.net 4, not 4.5. Sorry.
 
Old March 10th, 2014, 04:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take a look at the section "Overriding the LocalSqlServer Connection String" in Appendix B. It shows how to reconfigure the membership services.

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!
 
Old March 10th, 2014, 04:36 PM
Registered User
 
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

OK. you are dealing with a real dummy here so that will take me a while to figure that all out. After I do this, would I then have to recreate the aspnetdb database so it gets created in 2005?

As far as your suggestion for finding a new host who uses a newer server, I think that is a very good suggestion. I have other issues with my host other than this. Do you have any suggestions. I would like to find a host that has good tech support since I am very new to all this.

Thanks for your help.
 
Old March 10th, 2014, 05:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Also check out the section "Configuring Your Database for the Application Services". Together they show you to create and configure the database.

For hosting, you may want to take a look here: http://www.asp.net/hosting

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!
The Following User Says Thank You to Imar For This Useful Post:
JohnBeck (March 10th, 2014)
 
Old March 15th, 2014, 12:00 PM
Registered User
 
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Imar, I have gone through the info on Overriding the LocalSqlServer Connection String and Configuring for Application Services. I seem to understand what to do except I am a little confused about overriding the three providers in web.config file. Can I just copy and paste all the code from my machine.config file into my web.config and edit the connectionStringName in the three providers?

I am also seriously considering your suggestion of changing to another host. I looked at www.asp.net/hosting as you suggested. But there are still a lot of choices. Would you care to make any suggestions as to which one might be better than another as far as reliability and customer support?

Thanks again for your help in this matter.
 
Old March 16th, 2014, 12:08 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, you could copy and paste the existing providers from the machine.config. However, they should already be present in your own web.config so the only thing you need to do is point the connectionStringName attribute of the existing providers to the correct connection string.

I can't recommend any of the hosts as I never used them (enough) to have an opinion.

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
Newby need to import Excel to SQL2005 TashaAT C# 2005 35 August 3rd, 2008 02:45 PM
Replication with SQL2005 seananderson Access 0 November 30th, 2007 05:32 AM
sql2005 management studio very slow lucycastaldo SQL Server 2005 0 November 22nd, 2007 06:41 PM
Add a 2'nd SQL2005 db ADH BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 August 25th, 2007 06:08 PM
SQL2005 to SQL2000 issue SoftMind BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 May 2nd, 2006 09:09 AM





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