Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
|
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 June 23rd, 2014, 06:03 PM
Registered User
 
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
 
Old June 23rd, 2014, 07:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 23rd, 2014, 08:14 PM
Registered User
 
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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..
 
Old June 24th, 2014, 11:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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 June 24th, 2014, 01:51 PM
Registered User
 
Join Date: Jun 2014
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old June 25th, 2014, 09:45 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
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
Web User Controls mkaftor BOOK: Beginning ASP.NET 4 : in C# and VB 1 August 7th, 2012 03:43 AM
CHAPTER 6 -ADDING THEME TO WEB.CONFIG FILE bankole BOOK: Beginning ASP.NET 4 : in C# and VB 2 February 8th, 2011 09:16 AM
User controls' content: Chapter 2 User Controls AGS BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 10 July 26th, 2007 05:36 AM
web.config file apry BOOK: Beginning ASP.NET 1.0 1 May 27th, 2004 06:39 AM





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