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 March 6th, 2018, 04:34 PM
Registered User
 
Join Date: Mar 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default page 517 - using model binding with linq queries

To test out the functionality you have so far, save all your changes, close all open files, and
then request NewPhotoAlbum.aspx in your browser. Make sure you don’t accidentally open
ManagePhotoAlbum.aspx, because it requires a query string that is sent by NewPhotoAlbum.aspx.
Enter a new name for the photo album and click Insert. You’re taken to ManagePhotoAlbum.aspx,
where you can enter new pictures. For now, all you can do is enter the description of the picture,

So i have followed the book word by word but when i enter a new album name in NewPhotoAlbum.aspx .. i get this error message...


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.



Things you can try:
•Create the content on the Web server.
•Review the browser URL.
•Check the failed request tracing log and see which module is calling SetStatus. For more information, click here.



Detailed Error Information:



Module
IIS Web Core

Notification
MapRequestHandler

Handler
StaticFile

Error Code
0x80070002



Requested URL
http://localhost:2210/ManagePhotoAlb...toAlbumId=2017

Physical Path
C:\BegASPNET\Site\ManagePhotoAlbum

Logon Method
Anonymous

Logon User
Anonymous

Request Tracing Directory
C:\Users\gb7bold1\Documents\IISExpress\TraceLogFil es\SITE

The record gets added to the database but the page doesnt re-direct to the Response.Redirect(string.Format("ManagePhotoAlbum? PhotoAlbumId={0}", photoAlbum.Id.ToString()));

I have checked for typo's etc, i just cant get my head around this one. please help.
 
Old March 8th, 2018, 04:52 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,

Two things to check:

1. Did you install the friendly URL package earlier in the book? If not, try adding the .aspx extension to the file ManagePhotoAlbum in the redirect code.

2. Is the ManagePhotoAlbum page really called ManagePhotoAlbum?

If all fails, can you zip up the site and make it available online somewhere? Then I'll take a look.

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
Chapter 14 A simple model binding application hansheung BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 2 November 22nd, 2016 05:42 AM
Chapter 14 page 517 injen BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 7 September 26th, 2016 10:00 AM
hapter 14 Third Try It Out A Simple Model Binding Application, page 505 yasirmehmood BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 11 March 24th, 2016 03:45 AM
SProcs and Not Linq Queries fzr600dave BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 May 17th, 2009 02:04 PM
confusing in ADO.NET Entity Data Model,Linq to sql angelboy ADO.NET 5 November 21st, 2008 05:01 PM





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