Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5.1 > BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : 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 May 21st, 2016, 06:08 AM
Registered User
 
Join Date: May 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6: Try It Out: Creating a Web.sitemap File

I modified the Web.sitemap exactly as suggested in the book page 245. For example (only part of the exercise is shown here):

<siteMapNode url="~/" title="Home" description="Home">
<siteMapNode url="~/Default" title="Home" description="Go to the homepage" />
<siteMapNode url="~/Reviews/Default" title="Reviews" description="Reviews Published on this site" >
<siteMapNode url="~/Reviews/AllByGenre" title="By Genre" description="All Reviews Grouped By Genre" />
<siteMapNode url="~/Reviews/All" title="All Reviews" description="All Reviews" />
</siteMapNode>

on Ctrl+F5 the following error is displayed:

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:

The directory or file specified does not exist on the Web server.
The URL contains a typographical error.
A custom filter or module, such as URLScan, restricts access to the file.

After multiple tries, and finally on changing the Web.sitemap file to include the extension of the files".aspx", the site runs as expected. The part of the code extracted above and changed to the following:

<siteMapNode url="~/" title="Home" description="Home">
<siteMapNode url="~/Default.aspx" title="Home" description="Go to the homepage" />
<siteMapNode url="~/Reviews/Default.aspx" title="Reviews" description="Reviews Published on this site" >
<siteMapNode url="~/Reviews/AllByGenre.aspx" title="By Genre" description="All Reviews Grouped By Genre" />
<siteMapNode url="~/Reviews/All.aspx" title="All Reviews" description="All Reviews" />
</siteMapNode>


Acknowledging that the code without the extension works when implementing the Extension-less URLs on page 263. (Note: to reproduce the error, I had to remove the applied Extension-less exercise).
 
Old May 31st, 2016, 10:14 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 there,

Are you on a Kindle version of the book by any chance? My hard copy shows this on page 245:
Code:
<siteMapNode url="~/" title="Home"  description="Home">
<siteMapNode url="~/Default.aspx." title="Home" description="Go to the homepage" /> <siteMapNode url="~/Reviews/Default.aspx." title="Reviews" description="Reviews Published on this site" > <siteMapNode url="~/Reviews/AllByGenre.aspx." title="By Genre" description="All Reviews Grouped By Genre" />
Note the aspx extension on each of the URLs.

Also, note the period after each extension. That's a bug in the book, which has been added to the errata (http://www.wrox.com/WileyCDA/WroxTit...Cd-ERRATA.html).

It seems like whoever applied the errata to the eBook version deleted those extensions from the code on page 245 as well.

If you can let me know which book version you have, I can follow up with Wrox.

Thanks,

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
small issue creating sitemap.xml usinf ASP mat41 Classic ASP Professional 1 April 22nd, 2014 05:46 AM
Web.sitemap Wilfredo Rosado BOOK: Beginning ASP.NET 4 : in C# and VB 1 January 10th, 2013 10:06 AM
Problem in assigning css class in each items of navigation menu of web.sitemap file prathoven BOOK: Beginning ASP.NET 4 : in C# and VB 4 July 6th, 2011 08:39 PM
web.sitemap workidoo BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 June 13th, 2008 08:42 AM
Web.Sitemap Tremmorkeep BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 July 21st, 2006 05:32 PM





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