Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 September 19th, 2012, 09:25 AM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default Confused with Recurring Error

Hi All,

I have developed my website after completing my study of Imar's book on Beginning ASP.NET 4.

The only thing that I still have not grasped is why I constantly get errors every day, reported by my website, as to pages that do not exist?

As an example I get (I do not expect anyone to read all of this):-

Quote:
Message
The file '/Campaigns/Security/CreateNewUser.aspx' does not exist.
Stack Trace
at System.Web.UI.Util.CheckVirtualFileExists(VirtualP ath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildR esultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildR esultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPath ObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstance FromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.UI.PageHandlerFactory.GetHandlerHelper( HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String requestType, String virtualPath, String path) at System.Web.HttpApplication.MaterializeHandlerExecu tionStep.System.Web.HttpApplication.IExecutionStep .Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
Query String
This page has NEVER existed in this path but it does exist in the correct path of ~/Security/CreateNewUser.aspx? This error is not just specific to this page but occurs with various pages that do exist in various different locations???

Please do have a look at the site Bionature UK Ltd (sorry, don't mean to push people to my site but a bit of marketing cannot be a bad thing) and you will see that you do not get any errors when browsing to any page.

So my question is does anyone know why this error is occurring?

Hoping for an answer.

Ian Ryder.
 
Old September 19th, 2012, 09:48 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 Ian,

Take a look here:

http://bionatureagriculture.com/Camp...2/Default.aspx

Then try to register with the link at the top. You're taken to Campaigns/Security/CreateNewUser.aspx which results in a 404

My guess is that the Register link (in a Master Page?) uses a relative link, not a root relative link. Change it to ~/Security.... (and if necessary, add runat="server to the link) and the problem is probably fixed.

P.S. Congrats on the site. Looks great!

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 September 19th, 2012, 09:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

BTW: you may need to change your error pages stratgey a bit.

If I request the page that cannot be found, it returns a 200 OK status. That page in turn requests a CSS file that doesn't exist. Setting the proper redirect type and status code as explained in the book should help.

You can use a tool like Fiddler (http://fiddler2.com) to see response codes.

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 September 19th, 2012, 11:23 PM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Hi Imar,

Good to hear from you again and I hope you are well.

YOU ARE A STAR!

I cannot believe that I missed this simplest of errors on my part. I have applied the fixes that you pointed out and I can confirm that this has indeed fixed the problem. All I need to do now is go through each page of the site to find all the instances where this fix needs to be applied.

Thanks once again Imar and I am glad that you liked the site. Still quite a bit left to do but that would not have been possible without you and your book.

Take care Imar, keep up the good work and talk to you again soon.

Kindest regards,

Ian.
 
Old September 20th, 2012, 02:08 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 Ian,

Quote:
All I need to do now is go through each page of the site to find all the instances where this fix needs to be applied.
Isn't the register link inside a Master Page so you would have to fix it only once?

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 September 20th, 2012, 03:25 AM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Hi Imar,

The small point that you must have missed is that I am also getting this with various other pagess on the site so I have obviously made the same mistake in other pages - already found another two. By the way, yes the register link is inside the master page.

Cheers,

Ian.

Last edited by Ian Ryder; September 20th, 2012 at 03:29 AM..
 
Old September 20th, 2012, 04:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah, I see. Thanks for clarifying that.

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
To solve the Exception in Monthly recurring events amoghgr C# 0 August 21st, 2007 06:21 AM
Finding a day on a calendar based on recurring val kriskhoury C# 0 July 2nd, 2007 04:03 PM
RECURRING LOGIC its.shashank Classic ASP Databases 1 November 22nd, 2006 08:58 AM
Confused on error fs22 Javascript 5 June 23rd, 2004 11:53 AM





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