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

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

March 10th, 2014, 02:37 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

March 10th, 2014, 03:44 PM
|
|
Registered User
|
|
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Imar, I just realized I am in the wrong forum. I am using your book for Asp.net 4, not 4.5. Sorry.
|
|

March 10th, 2014, 04:16 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Take a look at the section "Overriding the LocalSqlServer Connection String" in Appendix B. It shows how to reconfigure the membership services.
Cheers,
Imar
|
|

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

March 10th, 2014, 05:08 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

March 15th, 2014, 12:00 PM
|
|
Registered User
|
|
Join Date: Mar 2014
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
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.
|
|

March 16th, 2014, 12:08 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |
|