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

June 23rd, 2014, 06:03 PM
|
|
Registered User
|
|
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 8: Registering User controls in the Web.config File
I am using VS 2013 and trying to work on the Try It Out on pages 293-294.
I copied the entire contents of the Web.config file from the sample code from c\BegASPNET\Source\Chapter 09 into VS, but I am still getting an error :
Error 1 Unrecognized configuration section system.web/add. C:\BegASPNET\Site\Web.config 9
I've made sure I've saved the file. Any ideas?
Thanks!
|
|

June 23rd, 2014, 07:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
can you post your code? Please paste it in notepad first to get rid of the formatting and then wrap it in code tags using the # button on the toolbar of the forum editor.
cheers,
Imar
|
|

June 23rd, 2014, 08:14 PM
|
|
Registered User
|
|
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Imar,
I just cut and pasted the code from the download.
Code:
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<pages theme="Monochrome">
<controls>
<add tagPrefix="Wrox" tagName="Banner" src="~/Controls/Banner.ascx" />
</controls>
</pages>
<compilation debug="false" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
Last edited by slittle; June 23rd, 2014 at 08:17 PM..
|
|

June 24th, 2014, 11:30 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Are you sure this is the actual config file used at runtime?The code looks fine to me so something else must be going wrong. When you create a brand new website in VS and then copy in the code, does it work?
Cheers,
Imar
|
|

June 24th, 2014, 01:51 PM
|
|
Registered User
|
|
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Not an error in the book, a glitch in VS 2013
It seems to have been a glitch in VS. I closed all the files. Then opened the "Chapter 08" website that had been downloaded. There were no errors there. When I switched back to my site, it is no longer showing the error. Gotta love software
Thanks for your help,
Stepanie
|
|

June 25th, 2014, 09:45 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Stepanie,
Good to hear. Maybe VS just hadn't caught up with the changes. When something like this happens again close all open files and then build the application from the Build or Website menu.
Cheers,
Imar
|
|
 |
|