Wrox Programmer Forums
|
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 October 23rd, 2015, 10:21 AM
Registered User
 
Join Date: Oct 2015
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 7

I'm using VS 2015.
(1) Clicking the links (Home, Reviews etc) displays a screen with error message:
Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Default.aspx.
(2) Where can I enter "Install-Package Microsoft.AspNet.FriendlyUrls.Co" - Tools > NuGetPackageManager > Package Manger - does not open anything.
(3) Can you please let me know which pieces of code to post to this thread.
 
Old October 24th, 2015, 03:02 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,

Can you see any page at all? This:

>> Requested URL: /Default.aspx.

Is weird, as you should have Default.aspx pages in your root and various folders.

I don't know where that .Co is coming from. The page is called Microsoft.AspNet.FriendlyUrls and can be found here: http://www.nuget.org/packages/Micros....FriendlyUrls/

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 October 26th, 2015, 05:29 AM
Registered User
 
Join Date: Oct 2015
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When I first load the page CTRL + F5, it loads and looks ok. I get the error when I select an option, such as 'Home', 'About' etc. Default.aspx does exist in all the relevant places. When I click on the 'login' link on the main page this works, but when I select it from the bar, I get a similar error to 'Home', 'About etc.:
----------------
Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Login.aspx.
 
Old October 26th, 2015, 09:14 AM
Registered User
 
Join Date: Oct 2015
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now working
 
Old October 26th, 2015, 08:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great.

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 November 18th, 2015, 10:48 AM
Registered User
 
Join Date: Nov 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Martinedhotman I have the same issue. How did you resolve it?
 
Old January 20th, 2016, 09:03 AM
Registered User
 
Join Date: Jan 2016
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
Default

I also have the same issue, it appear the FriendyURL package is not automatically adding the .aspx extensions as implied in the book.

Can you please advise how this was resolved?
 
Old January 20th, 2016, 11:31 AM
Registered User
 
Join Date: Jan 2016
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
Thumbs up

I have found the reason, at the point in the chapter where you test the menus, we have not yet set up the RouteConfig class and Global.asax in order to make the SiteMap work without the .aspx extenstions.

The section in the chapter 'Extensionless URLs' covers this.

Hope this helps anyone else at this point in the book.
The Following 2 Users Say Thank You to ChrisHileyTC For This Useful Post:
Gedryk (March 5th, 2016), Imar (January 24th, 2016)
 
Old March 5th, 2016, 01:52 PM
Registered User
 
Join Date: Feb 2016
Posts: 2
Thanks: 2
Thanked 3 Times in 2 Posts
Default

Please also note that the SiteMapPath is not working until the Global.asax is created and configured.

(Just found out after spending an hour wondering why my control, didn't worked... reading the book again and again )
The Following User Says Thank You to Gedryk For This Useful Post:
Imar (March 6th, 2016)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 --> Chapter 5 Continuity?? theboffin BOOK: Professional ASP.NET MVC 4 4 July 8th, 2013 03:36 AM
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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