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

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

October 24th, 2015, 03:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

October 26th, 2015, 09:14 AM
|
|
Registered User
|
|
Join Date: Oct 2015
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Now working
|
|

October 26th, 2015, 08:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Great.
Imar
|
|

November 18th, 2015, 10:48 AM
|
|
Registered User
|
|
Join Date: Nov 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Martinedhotman I have the same issue. How did you resolve it?
|
|

January 20th, 2016, 09:03 AM
|
|
Registered User
|
|
Join Date: Jan 2016
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
|
|
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?
|
|

January 20th, 2016, 11:31 AM
|
|
Registered User
|
|
Join Date: Jan 2016
Posts: 2
Thanks: 0
Thanked 2 Times in 1 Post
|
|
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)
|
|

March 5th, 2016, 01:52 PM
|
|
Registered User
|
|
Join Date: Feb 2016
Posts: 2
Thanks: 2
Thanked 3 Times in 2 Posts
|
|
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:
|
|
|
 |
|